aboutsummaryrefslogtreecommitdiffstats
path: root/embed/ephy-favicon-cache.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2003-06-15 19:35:13 +0800
committerChristian Persch <chpe@src.gnome.org>2003-06-15 19:35:13 +0800
commitfa31654eac12411d58ab603924953410c53e1426 (patch)
tree1de3cfad3f21d1d90d46496288caa587c61792b8 /embed/ephy-favicon-cache.c
parent70c9516fd0741ecd185196f33dcd9c7ad63d69fb (diff)
downloadgsoc2013-epiphany-fa31654eac12411d58ab603924953410c53e1426.tar
gsoc2013-epiphany-fa31654eac12411d58ab603924953410c53e1426.tar.gz
gsoc2013-epiphany-fa31654eac12411d58ab603924953410c53e1426.tar.bz2
gsoc2013-epiphany-fa31654eac12411d58ab603924953410c53e1426.tar.lz
gsoc2013-epiphany-fa31654eac12411d58ab603924953410c53e1426.tar.xz
gsoc2013-epiphany-fa31654eac12411d58ab603924953410c53e1426.tar.zst
gsoc2013-epiphany-fa31654eac12411d58ab603924953410c53e1426.zip
Fix mem leaks.
2003-06-15 Christian Persch <chpe@cvs.gnome.org> * src/session.c: (do_session_resume): * embed/ephy-favicon-cache.c: (ephy_favicon_cache_download), (ephy_favicon_cache_get): Fix mem leaks.
Diffstat (limited to 'embed/ephy-favicon-cache.c')
-rw-r--r--embed/ephy-favicon-cache.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/embed/ephy-favicon-cache.c b/embed/ephy-favicon-cache.c
index 2a1d5c2c5..c2475cd41 100644
--- a/embed/ephy-favicon-cache.c
+++ b/embed/ephy-favicon-cache.c
@@ -402,7 +402,7 @@ ephy_favicon_cache_download (EphyFaviconCache *cache,
const char *filename)
{
EphyEmbedPersist *persist;
- const char *dest;
+ char *dest;
LOG ("Download favicon: %s", favicon_url)
@@ -419,6 +419,8 @@ ephy_favicon_cache_download (EphyFaviconCache *cache,
ephy_embed_persist_set_source (persist, favicon_url);
ephy_embed_persist_set_dest (persist, dest);
+ g_free (dest);
+
g_object_set_data_full (G_OBJECT (persist), "url",
g_strdup (favicon_url), g_free);
@@ -440,7 +442,7 @@ ephy_favicon_cache_get (EphyFaviconCache *cache,
GTime now;
EphyNode *icon;
GValue value = { 0, };
- const char *pix_file;
+ char *pix_file;
GdkPixbuf *pixbuf;
now = time (NULL);
@@ -479,6 +481,7 @@ ephy_favicon_cache_get (EphyFaviconCache *cache,
g_value_set_int (&value, now);
ephy_node_set_property (icon, EPHY_NODE_FAVICON_PROP_LAST_USED,
&value);
+ g_value_unset (&value);
if (g_hash_table_lookup (cache->priv->downloads_hash, url) != NULL)
{
@@ -491,8 +494,6 @@ ephy_favicon_cache_get (EphyFaviconCache *cache,
ephy_node_get_property_string (icon, EPHY_NODE_FAVICON_PROP_FILENAME),
NULL);
- g_hash_table_lookup (cache->priv->icons_hash, url);
-
LOG ("Create pixbuf for %s", pix_file)
pixbuf = gdk_pixbuf_new_from_file (pix_file, NULL);
@@ -507,7 +508,7 @@ ephy_favicon_cache_get (EphyFaviconCache *cache,
pixbuf = scaled;
}
+ g_free (pix_file);
+
return pixbuf;
}
-
-