aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-07-14 16:18:46 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-07-14 16:18:46 +0800
commit7af1dee75adc774fedbdf9ec7e473f490528795b (patch)
treec560ece7649a0b71aaa93c601f927d016c5471e7 /libempathy-gtk
parent0a8ab81a9e060a5f6dbbb64ba9bc93b57bd1fc12 (diff)
downloadgsoc2013-empathy-7af1dee75adc774fedbdf9ec7e473f490528795b.tar
gsoc2013-empathy-7af1dee75adc774fedbdf9ec7e473f490528795b.tar.gz
gsoc2013-empathy-7af1dee75adc774fedbdf9ec7e473f490528795b.tar.bz2
gsoc2013-empathy-7af1dee75adc774fedbdf9ec7e473f490528795b.tar.lz
gsoc2013-empathy-7af1dee75adc774fedbdf9ec7e473f490528795b.tar.xz
gsoc2013-empathy-7af1dee75adc774fedbdf9ec7e473f490528795b.tar.zst
gsoc2013-empathy-7af1dee75adc774fedbdf9ec7e473f490528795b.zip
Fix leaked accounts. mc_accounts_list ref all accounts.
svn path=/trunk/; revision=1226
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-accounts-dialog.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/libempathy-gtk/empathy-accounts-dialog.c b/libempathy-gtk/empathy-accounts-dialog.c
index b88510c6b..8e62f1ad9 100644
--- a/libempathy-gtk/empathy-accounts-dialog.c
+++ b/libempathy-gtk/empathy-accounts-dialog.c
@@ -174,6 +174,7 @@ accounts_dialog_setup (EmpathyAccountsDialog *dialog)
name = mc_account_get_display_name (account);
if (!name) {
+ g_object_unref (account);
continue;
}
@@ -765,17 +766,19 @@ accounts_dialog_status_changed_cb (MissionControl *mc,
g_object_unref (account);
/* Check if there is still accounts in CONNECTING state */
- accounts = mc_accounts_list ();
+ accounts = mc_accounts_list_by_enabled (TRUE);
for (l = accounts; l; l = l->next) {
- McAccount *this_account;
+ McAccount *this_account = l->data;
TpConnectionStatus status;
- this_account = l->data;
+ if (found) {
+ g_object_unref (this_account);
+ continue;
+ }
status = mission_control_get_connection_status (mc, this_account, NULL);
if (status == TP_CONNECTION_STATUS_CONNECTING) {
found = TRUE;
- break;
}
g_object_unref (this_account);