From 4219a6f424ff4ca9bc7d0dafebbd3803f4d6b1bb Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 10 Mar 2014 17:30:56 +0000 Subject: [PATCH 08/23] account test: don't leak copied strings --- tests/dbus/account.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/dbus/account.c b/tests/dbus/account.c index eadac87..dde9ceb 100644 --- a/tests/dbus/account.c +++ b/tests/dbus/account.c @@ -747,8 +747,9 @@ test_connection (Test *test, g_assert_cmpstr (tp_proxy_get_object_path (conn), ==, conn1_path); g_assert_cmpuint (test_get_times_notified (test, "connection"), ==, 1); - g_assert_cmpstr (tp_account_dup_detailed_error (test->account, NULL), - ==, TP_ERROR_STR_CANCELLED); + s = tp_account_dup_detailed_error (test->account, NULL); + g_assert_cmpstr (s, ==, TP_ERROR_STR_CANCELLED); + g_free (s); /* a no-op "change" */ @@ -796,8 +797,9 @@ test_connection (Test *test, conn = tp_account_get_connection (test->account); g_assert (conn == NULL); - g_assert_cmpstr (tp_account_dup_detailed_error (test->account, NULL), - ==, TP_ERROR_STR_ENCRYPTION_ERROR); + s = tp_account_dup_detailed_error (test->account, NULL); + g_assert_cmpstr (s, ==, TP_ERROR_STR_ENCRYPTION_ERROR); + g_free (s); /* another connection */ -- 1.9.0