[empathy] theme-manager: fix GList leak



commit f36171ef13831fbf2e7df7087e5899e05a37f2b2
Author: Pavel Vasin <rat4vier gmail com>
Date:   Sun Oct 7 13:56:42 2012 +0400

    theme-manager: fix GList leak
    
    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 |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/libempathy-gtk/empathy-theme-manager.c b/libempathy-gtk/empathy-theme-manager.c
index 6c66c25..e743e2f 100644
--- a/libempathy-gtk/empathy-theme-manager.c
+++ b/libempathy-gtk/empathy-theme-manager.c
@@ -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);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]