From 6a5b51b273fc447c7611675b97268fc99216d430 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Tue, 11 Sep 2012 12:35:26 +0200 Subject: 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. --- .../cc-plugins/account-plugins/empathy-accounts-plugin-widget.c | 4 ++-- .../cc-plugins/app-plugin/empathy-app-plugin-widget.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'ubuntu-online-accounts') diff --git a/ubuntu-online-accounts/cc-plugins/account-plugins/empathy-accounts-plugin-widget.c b/ubuntu-online-accounts/cc-plugins/account-plugins/empathy-accounts-plugin-widget.c index f76eb5cd4..34729960c 100644 --- a/ubuntu-online-accounts/cc-plugins/account-plugins/empathy-accounts-plugin-widget.c +++ b/ubuntu-online-accounts/cc-plugins/account-plugins/empathy-accounts-plugin-widget.c @@ -310,7 +310,7 @@ manager_prepared_cb (GObject *source, goto out; } - accounts = tp_account_manager_get_valid_accounts (manager); + accounts = tp_account_manager_dup_valid_accounts (manager); while (accounts != NULL) { TpAccount *account = accounts->data; @@ -328,7 +328,7 @@ manager_prepared_cb (GObject *source, accounts = g_list_delete_link (accounts, accounts); } - g_list_free (accounts); + g_list_free_full (accounts, g_object_unref); out: tp_weak_ref_destroy (wr); diff --git a/ubuntu-online-accounts/cc-plugins/app-plugin/empathy-app-plugin-widget.c b/ubuntu-online-accounts/cc-plugins/app-plugin/empathy-app-plugin-widget.c index d07982a3b..768f0965d 100644 --- a/ubuntu-online-accounts/cc-plugins/app-plugin/empathy-app-plugin-widget.c +++ b/ubuntu-online-accounts/cc-plugins/app-plugin/empathy-app-plugin-widget.c @@ -195,7 +195,7 @@ manager_prepared_cb (GObject *source, goto out; } - accounts = tp_account_manager_get_valid_accounts (manager); + accounts = tp_account_manager_dup_valid_accounts (manager); while (accounts != NULL) { TpAccount *account = accounts->data; @@ -219,7 +219,7 @@ manager_prepared_cb (GObject *source, accounts = g_list_delete_link (accounts, accounts); } - g_list_free (accounts); + g_list_free_full (accounts, g_object_unref); out: tp_weak_ref_destroy (wr); -- cgit v1.2.3