[next] telepathy-glib: account-request test: teardown: free result first
Simon McVittie
smcv at kemper.freedesktop.org
Tue Mar 18 05:45:06 PDT 2014
Module: telepathy-glib
Branch: next
Commit: 8a868b043d97c0af94f3e3dcb65767b81f2aac6f
URL: http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=8a868b043d97c0af94f3e3dcb65767b81f2aac6f
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date: Mon Mar 17 15:35:07 2014 +0000
account-request test: teardown: free result first
It holds refs to the account request and the account, so we need to
release those before we can assert that any other refs have been
fully released.
---
tests/dbus/account-request.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tests/dbus/account-request.c b/tests/dbus/account-request.c
index fe39817..5eabe79 100644
--- a/tests/dbus/account-request.c
+++ b/tests/dbus/account-request.c
@@ -68,6 +68,10 @@ static void
teardown (Test *test,
gconstpointer data G_GNUC_UNUSED)
{
+ /* holds a ref to the TpAccountRequest and to the TpAccount */
+ if (test->result != NULL)
+ tp_tests_assert_last_unref (&test->result);
+
g_clear_object (&test->ar);
/* If we don't let it prepare before we tear down the AccountManager
@@ -90,7 +94,6 @@ teardown (Test *test,
tp_clear_pointer (&test->mainloop, g_main_loop_unref);
g_clear_error (&test->error);
- g_clear_object (&test->result);
}
static void
More information about the telepathy-commits
mailing list