empathy r2066 - trunk/libempathy
- From: xclaesse svn gnome org
- To: svn-commits-list gnome org
- Subject: empathy r2066 - trunk/libempathy
- Date: Tue, 6 Jan 2009 16:48:10 +0000 (UTC)
Author: xclaesse
Date: Tue Jan 6 16:48:10 2009
New Revision: 2066
URL: http://svn.gnome.org/viewvc/empathy?rev=2066&view=rev
Log:
Don't leak a reference to McAccount objects and don't leak a list.
Modified:
trunk/libempathy/empathy-account-manager.c
Modified: trunk/libempathy/empathy-account-manager.c
==============================================================================
--- trunk/libempathy/empathy-account-manager.c (original)
+++ trunk/libempathy/empathy-account-manager.c Tue Jan 6 16:48:10 2009
@@ -334,9 +334,11 @@
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 @@
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]