Don't leak apps_by_name in GBookmarkFile metadata items
authorFederico Mena Quintero <federico@novell.com>
Wed, 9 Apr 2008 20:20:19 +0000 (20:20 +0000)
committerFederico Mena Quintero <federico@src.gnome.org>
Wed, 9 Apr 2008 20:20:19 +0000 (20:20 +0000)
2008-04-09  Federico Mena Quintero  <federico@novell.com>

* glib/gbookmarkfile.c (bookmark_metadata_free): Don't leak
the apps_by_name hash table if the applications list is empty.

Signed-off-by: Federico Mena Quintero <federico@gnu.org>
svn path=/trunk/; revision=6846

ChangeLog
glib/gbookmarkfile.c

index 2028a3486701182fde9bdbbe9cb6dfec7d915a7e..72ad4b383e769f2394aac4806f86b55e2c7be341 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-04-09  Federico Mena Quintero  <federico@novell.com>
+
+       * glib/gbookmarkfile.c (bookmark_metadata_free): Don't leak
+       the apps_by_name hash table if the applications list is empty.
+
 2008-04-08  Behdad Esfahbod  <behdad@gnome.org>
 
        * glib/gunicode.h: Add ISO 15924 code comments for new scripts.
index 70ce6ee531e68bcd06ba7b9dda817cdcc032bea4..7c34312c0750d0d90b7dfbb2757747c73096e224 100644 (file)
@@ -325,10 +325,10 @@ bookmark_metadata_free (BookmarkMetadata *metadata)
                      (GFunc) bookmark_app_info_free,
                      NULL);
       g_list_free (metadata->applications);
-      
-      g_hash_table_destroy (metadata->apps_by_name);
     }
-  
+
+  g_hash_table_destroy (metadata->apps_by_name);
+
   g_free (metadata->icon_href);
   g_free (metadata->icon_mime);