[telepathy-mission-control/master] McdAccountManager: don't leak a TpConnection every time we clean up a lost-in-space connection
Simon McVittie
simon.mcvittie at collabora.co.uk
Thu May 28 03:37:53 PDT 2009
Note that this is safe to do: the proxy isn't needed because the callback
will never be called (and if there was a callback, the TpConnection would
reference itself for the duration of the call to ensure that it survived
until just after the callback).
---
src/mcd-account-manager.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/mcd-account-manager.c b/src/mcd-account-manager.c
index fdec336..800c299 100644
--- a/src/mcd-account-manager.c
+++ b/src/mcd-account-manager.c
@@ -246,8 +246,11 @@ list_connection_names_cb (const gchar * const *names, gsize n,
DEBUG ("Killing connection");
proxy = tp_connection_new (priv->dbus_daemon, names[i], NULL, NULL);
if (proxy)
+ {
tp_cli_connection_call_disconnect (proxy, -1, NULL, NULL,
NULL, NULL);
+ g_object_unref (proxy);
+ }
}
}
g_free (contents);
--
1.5.6.5
More information about the telepathy-commits
mailing list