aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--embed/ephy-favicon-cache.c13
-rw-r--r--src/session.c3
3 files changed, 17 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 3eb8547a2..49504d757 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
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.
+
+2003-06-15 Christian Persch <chpe@cvs.gnome.org>
+
* embed/mozilla/mozilla-embed-single: (control_encodings_list):
* embed/mozilla/EventContext.cpp: (EventContext::SetIntProperty),
(EventContext::SetStringProperty (const char*, const char*)),
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;
}
-
-
diff --git a/src/session.c b/src/session.c
index b6a332d3d..751fdd186 100644
--- a/src/session.c
+++ b/src/session.c
@@ -173,10 +173,11 @@ get_session_filename (const char *filename)
static void
do_session_resume (Session *session)
{
- const char *crashed_session;
+ char *crashed_session;
crashed_session = get_session_filename (SESSION_CRASHED);
session_load (session, crashed_session);
+ g_free (crashed_session);
}
static void