aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-account-manager.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2009-01-07 00:48:10 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2009-01-07 00:48:10 +0800
commit9477559ddcd604d7d0687afa499694c4f3a2914f (patch)
tree81b146b69888f9e25979794c2bee69d338cf5b52 /libempathy/empathy-account-manager.c
parentcd20c442bcf035918999918a45b528dfa8a33021 (diff)
downloadgsoc2013-empathy-9477559ddcd604d7d0687afa499694c4f3a2914f.tar
gsoc2013-empathy-9477559ddcd604d7d0687afa499694c4f3a2914f.tar.gz
gsoc2013-empathy-9477559ddcd604d7d0687afa499694c4f3a2914f.tar.bz2
gsoc2013-empathy-9477559ddcd604d7d0687afa499694c4f3a2914f.tar.lz
gsoc2013-empathy-9477559ddcd604d7d0687afa499694c4f3a2914f.tar.xz
gsoc2013-empathy-9477559ddcd604d7d0687afa499694c4f3a2914f.tar.zst
gsoc2013-empathy-9477559ddcd604d7d0687afa499694c4f3a2914f.zip
Don't leak a reference to McAccount objects and don't leak a list.
svn path=/trunk/; revision=2066
Diffstat (limited to 'libempathy/empathy-account-manager.c')
-rw-r--r--libempathy/empathy-account-manager.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/libempathy/empathy-account-manager.c b/libempathy/empathy-account-manager.c
index e11289f3f..16f633015 100644
--- a/libempathy/empathy-account-manager.c
+++ b/libempathy/empathy-account-manager.c
@@ -334,9 +334,11 @@ empathy_account_manager_init (EmpathyAccountManager *manager)
for (l = mc_accounts; l; l = l->next) {
data = account_data_new_default (priv->mc, l->data);
-
- g_hash_table_insert (priv->accounts, g_object_ref (l->data),
- data);
+
+ /* no need to g_object_ref () the account here, as mc_accounts_list ()
+ * already increases the refcount.
+ */
+ g_hash_table_insert (priv->accounts, l->data, data);
}
g_signal_connect (priv->monitor, "account-created",
@@ -353,6 +355,8 @@ empathy_account_manager_init (EmpathyAccountManager *manager)
dbus_g_proxy_connect_signal (DBUS_G_PROXY (priv->mc), "AccountStatusChanged",
G_CALLBACK (account_status_changed_cb),
manager, NULL);
+
+ g_list_free (mc_accounts);
}
static void