[Xfce4-commits] <midori:master> Plug leak of icon path when loading icons
Christian Dywan
noreply at xfce.org
Thu Oct 14 21:18:05 CEST 2010
Updating branch refs/heads/master
to 5d7bbe6eb16835a04e4bffb60f40cee8b7427f08 (commit)
from 18946b10b2631985bb12d6e04a3ff95b15d2ac50 (commit)
commit 5d7bbe6eb16835a04e4bffb60f40cee8b7427f08
Author: Christian Dywan <christian at twotoasts.de>
Date: Thu Oct 14 21:06:45 2010 +0200
Plug leak of icon path when loading icons
midori/midori-view.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/midori/midori-view.c b/midori/midori-view.c
index 40ff24d..a72e57b 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -872,9 +872,9 @@ _midori_web_view_load_icon (MidoriView* view)
i++;
if (view->uri[i] == '/')
{
- icon_uri = g_strdup (view->uri);
- icon_uri[i] = '\0';
- icon_uri = g_strdup_printf ("%s/favicon.ico", icon_uri);
+ gchar* path = g_strndup (view->uri, i);
+ icon_uri = g_strdup_printf ("%s/favicon.ico", path);
+ g_free (path);
}
else
icon_uri = g_strdup_printf ("%s/favicon.ico", view->uri);
More information about the Xfce4-commits
mailing list