]> git.0d.be Git - empathy.git/commitdiff
theme-manager: fix GList leak
authorPavel Vasin <rat4vier@gmail.com>
Sun, 7 Oct 2012 09:56:42 +0000 (13:56 +0400)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Mon, 8 Oct 2012 07:55:59 +0000 (09:55 +0200)
g_hash_table_get_values() returns newly allocated list and it was lost

https://bugzilla.gnome.org/show_bug.cgi?id=685652

libempathy-gtk/empathy-theme-manager.c

index 6c66c25023ecfef232c05593b871b0d9631d221c..e743e2fa5599620ea1dbb30b4764140475a73f22 100644 (file)
@@ -368,9 +368,9 @@ empathy_theme_manager_get_adium_themes (void)
       g_free (path);
     }
 
+  result = g_hash_table_get_values (hash);
   /* Pass ownership of the info hash table to the list */
-  result = g_list_copy_deep (g_hash_table_get_values (hash),
-      (GCopyFunc) g_hash_table_ref, NULL);
+  g_list_foreach (result, (GFunc) g_hash_table_ref, NULL);
 
   g_hash_table_unref (hash);