From baf0ffb02c92e4ed1d04d6728d60eca7c5db5cdc Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Wed, 25 Nov 2009 04:42:42 +0000 Subject: [PATCH] (trunk gtk) #2605: GIcon memory leak in GTK+ client --- gtk/icons.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gtk/icons.c b/gtk/icons.c index e9edad47f..b913c1123 100644 --- a/gtk/icons.c +++ b/gtk/icons.c @@ -211,12 +211,15 @@ icon_cache_get_mime_type_icon( IconCache * icon_cache, pixbuf = g_hash_table_lookup( icon_cache->cache, key ); if (pixbuf != NULL) { g_object_ref( pixbuf ); + g_object_unref( G_OBJECT( icon ) ); return pixbuf; } pixbuf = _get_icon_pixbuf( icon, icon_cache->icon_size, icon_cache->icon_theme ); if( pixbuf != NULL ) g_hash_table_insert( icon_cache->cache, (gpointer) key, g_object_ref( pixbuf ) ); + + g_object_unref( G_OBJECT( icon ) ); return pixbuf; } -- 2.40.0