summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2014-03-17 15:35:07 +0000
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2014-03-17 15:48:19 +0000
commitb4664000d7e31e596fdd166b73724fe0db860528 (patch)
treea7da730d52930bc44691e84a38edc3e0cc45c225
parent86ccd479a1390d6d6f5951c039982f2862b8f372 (diff)
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.
-rw-r--r--tests/dbus/account-request.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/dbus/account-request.c b/tests/dbus/account-request.c
index fe3981734..5eabe7909 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