[next] telepathy-glib: TpTestsContactsConnection: don't leak list_manager

Simon McVittie smcv at kemper.freedesktop.org
Thu Mar 13 07:24:25 PDT 2014


Module: telepathy-glib
Branch: next
Commit: 030993a8c749d05731003d265de72155b304ea23
URL:    http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=030993a8c749d05731003d265de72155b304ea23

Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date:   Mon Mar 10 16:58:16 2014 +0000

TpTestsContactsConnection: don't leak list_manager

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=76000
Reviewed-by: Guillaume Desmottes

---

 tests/lib/contacts-conn.c |   11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/tests/lib/contacts-conn.c b/tests/lib/contacts-conn.c
index f8148c9..a8e9286 100644
--- a/tests/lib/contacts-conn.c
+++ b/tests/lib/contacts-conn.c
@@ -155,6 +155,16 @@ tp_tests_contacts_connection_init (TpTestsContactsConnection *self)
 }
 
 static void
+dispose (GObject *object)
+{
+  TpTestsContactsConnection *self = TP_TESTS_CONTACTS_CONNECTION (object);
+
+  g_clear_object (&self->priv->list_manager);
+
+  G_OBJECT_CLASS (tp_tests_contacts_connection_parent_class)->dispose (object);
+}
+
+static void
 finalize (GObject *object)
 {
   TpTestsContactsConnection *self = TP_TESTS_CONTACTS_CONNECTION (object);
@@ -535,6 +545,7 @@ tp_tests_contacts_connection_class_init (TpTestsContactsConnectionClass *klass)
   };
 
   object_class->constructed = constructed;
+  object_class->dispose = dispose;
   object_class->finalize = finalize;
   g_type_class_add_private (klass, sizeof (TpTestsContactsConnectionPrivate));
 



More information about the telepathy-commits mailing list