diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-07-02 20:08:01 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-07-02 20:11:23 +0800 |
commit | ddb848bbfc956f79171ea141ce6dba6eea484aa7 (patch) | |
tree | 6fba0ba1c553e6dbee1790a56d498cdbf67a86e6 /libempathy-gtk | |
parent | 82b5dbb25241135989406c6514e0b84184606645 (diff) | |
download | gsoc2013-empathy-ddb848bbfc956f79171ea141ce6dba6eea484aa7.tar gsoc2013-empathy-ddb848bbfc956f79171ea141ce6dba6eea484aa7.tar.gz gsoc2013-empathy-ddb848bbfc956f79171ea141ce6dba6eea484aa7.tar.bz2 gsoc2013-empathy-ddb848bbfc956f79171ea141ce6dba6eea484aa7.tar.lz gsoc2013-empathy-ddb848bbfc956f79171ea141ce6dba6eea484aa7.tar.xz gsoc2013-empathy-ddb848bbfc956f79171ea141ce6dba6eea484aa7.tar.zst gsoc2013-empathy-ddb848bbfc956f79171ea141ce6dba6eea484aa7.zip |
theme-manager: don't leak info is 2 themes have the same name
Diffstat (limited to 'libempathy-gtk')
-rw-r--r-- | libempathy-gtk/empathy-theme-manager.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libempathy-gtk/empathy-theme-manager.c b/libempathy-gtk/empathy-theme-manager.c index 4c8176b88..47ea737ff 100644 --- a/libempathy-gtk/empathy-theme-manager.c +++ b/libempathy-gtk/empathy-theme-manager.c @@ -336,7 +336,8 @@ empathy_theme_manager_get_adium_themes (void) gint i = 0; const gchar *dir; - hash = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL); + hash = g_hash_table_new_full (g_str_hash, g_str_equal, + g_free, (GDestroyNotify) g_hash_table_unref); /* Start from the more general locations (the system) to the more specific * ones ($HOME, EMPATHY_SRCDIR) so the more specific themes will override @@ -371,7 +372,8 @@ empathy_theme_manager_get_adium_themes (void) } /* Pass ownership of the info hash table to the list */ - result = g_list_copy (g_hash_table_get_values (hash)); + result = g_list_copy_deep (g_hash_table_get_values (hash), + (GCopyFunc) g_hash_table_ref, NULL); g_hash_table_unref (hash); |