aboutsummaryrefslogtreecommitdiffstats
path: root/src/bookmarks
diff options
context:
space:
mode:
authorPavel Vasin <rat4vier@gmail.com>2012-06-08 18:50:54 +0800
committerClaudio Saavedra <csaavedra@igalia.com>2012-06-12 17:03:03 +0800
commitd79b58f0d628d4c23859309724acd649c19d8ffc (patch)
tree99fa7d00b29481eddfeb7d913713baaa61be2002 /src/bookmarks
parent13af6864b16d2291d16efb49a6f3d3a4f44fbaf2 (diff)
downloadgsoc2013-epiphany-d79b58f0d628d4c23859309724acd649c19d8ffc.tar
gsoc2013-epiphany-d79b58f0d628d4c23859309724acd649c19d8ffc.tar.gz
gsoc2013-epiphany-d79b58f0d628d4c23859309724acd649c19d8ffc.tar.bz2
gsoc2013-epiphany-d79b58f0d628d4c23859309724acd649c19d8ffc.tar.lz
gsoc2013-epiphany-d79b58f0d628d4c23859309724acd649c19d8ffc.tar.xz
gsoc2013-epiphany-d79b58f0d628d4c23859309724acd649c19d8ffc.tar.zst
gsoc2013-epiphany-d79b58f0d628d4c23859309724acd649c19d8ffc.zip
ephy-bookmarks: fix memory leaks
webkit_favicon_database_get_favicon_uri returns newly allocated string https://bugzilla.gnome.org/show_bug.cgi?id=677720
Diffstat (limited to 'src/bookmarks')
-rw-r--r--src/bookmarks/ephy-bookmarks.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bookmarks/ephy-bookmarks.c b/src/bookmarks/ephy-bookmarks.c
index f20e150dc..f2a5ea677 100644
--- a/src/bookmarks/ephy-bookmarks.c
+++ b/src/bookmarks/ephy-bookmarks.c
@@ -252,10 +252,11 @@ icon_updated_cb (WebKitFaviconDatabase *favicon_database,
const char *address,
EphyBookmarks *eb)
{
- const char *icon;
+ char *icon;
icon = webkit_favicon_database_get_favicon_uri (favicon_database, address);
ephy_bookmarks_set_icon (eb, address, icon);
+ g_free (icon);
}
static void
@@ -1184,11 +1185,12 @@ ephy_bookmarks_add (EphyBookmarks *eb,
favicon_database = webkit_get_favicon_database ();
if (favicon_database != NULL)
{
- const char *icon = webkit_favicon_database_get_favicon_uri (favicon_database, url);
+ char *icon = webkit_favicon_database_get_favicon_uri (favicon_database, url);
if (icon != NULL)
{
ephy_node_set_property_string
(bm, EPHY_NODE_BMK_PROP_ICON, icon);
+ g_free (icon);
}
}