diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-09-11 18:35:26 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-09-11 21:10:43 +0800 |
commit | 6a5b51b273fc447c7611675b97268fc99216d430 (patch) | |
tree | 1c3b87bd9aea1d122dbb829c6c3bcec831fed9c6 /src/empathy-sanity-cleaning.c | |
parent | 57b261b8329e12d1ffcc46e7ecfbeca2caa8fb4b (diff) | |
download | gsoc2013-empathy-6a5b51b273fc447c7611675b97268fc99216d430.tar gsoc2013-empathy-6a5b51b273fc447c7611675b97268fc99216d430.tar.gz gsoc2013-empathy-6a5b51b273fc447c7611675b97268fc99216d430.tar.bz2 gsoc2013-empathy-6a5b51b273fc447c7611675b97268fc99216d430.tar.lz gsoc2013-empathy-6a5b51b273fc447c7611675b97268fc99216d430.tar.xz gsoc2013-empathy-6a5b51b273fc447c7611675b97268fc99216d430.tar.zst gsoc2013-empathy-6a5b51b273fc447c7611675b97268fc99216d430.zip |
use tp_account_manager_dup_valid_accounts()
tp_account_manager_get_valid_accounts() has been deprecated.
Fix an accounts list leak in empathy-sanity-cleaning.
Diffstat (limited to 'src/empathy-sanity-cleaning.c')
-rw-r--r-- | src/empathy-sanity-cleaning.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/empathy-sanity-cleaning.c b/src/empathy-sanity-cleaning.c index e810fcb29..60cecc972 100644 --- a/src/empathy-sanity-cleaning.c +++ b/src/empathy-sanity-cleaning.c @@ -126,7 +126,7 @@ fix_xmpp_account_priority (TpAccountManager *am) { GList *accounts, *l; - accounts = tp_account_manager_get_valid_accounts (am); + accounts = tp_account_manager_dup_valid_accounts (am); for (l = accounts; l != NULL; l = g_list_next (l)) { TpAccount *account = l->data; @@ -157,7 +157,7 @@ fix_xmpp_account_priority (TpAccountManager *am) g_hash_table_unref (params); } - g_list_free (accounts); + g_list_free_full (accounts, g_object_unref); } static void @@ -165,7 +165,7 @@ set_facebook_account_fallback_server (TpAccountManager *am) { GList *accounts, *l; - accounts = tp_account_manager_get_valid_accounts (am); + accounts = tp_account_manager_dup_valid_accounts (am); for (l = accounts; l != NULL; l = g_list_next (l)) { TpAccount *account = l->data; @@ -197,7 +197,7 @@ set_facebook_account_fallback_server (TpAccountManager *am) g_hash_table_unref (params); } - g_list_free (accounts); + g_list_free_full (accounts, g_object_unref); } static void @@ -540,7 +540,7 @@ migrate_accounts_to_uoa (SanityCtx *ctx) manager = empathy_uoa_manager_dup (); - accounts = tp_account_manager_get_valid_accounts (ctx->am); + accounts = tp_account_manager_dup_valid_accounts (ctx->am); for (l = accounts; l != NULL; l = g_list_next (l)) { TpAccount *account = l->data; @@ -562,6 +562,8 @@ migrate_accounts_to_uoa (SanityCtx *ctx) migrate_account_to_uoa (ctx->am, account); } + g_list_free_full (accounts, g_object_unref); + g_object_unref (manager); } #endif |