From 3dc1a1af55c84913a2901346217ffc22d85d6abf Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 2 Jun 2017 12:19:18 +0100 Subject: [PATCH 7/9] test/dbus-daemon: Fix some memory leaks Signed-off-by: Simon McVittie --- test/dbus-daemon.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/dbus-daemon.c b/test/dbus-daemon.c index d0b44d72..dc73d71c 100644 --- a/test/dbus-daemon.c +++ b/test/dbus-daemon.c @@ -370,6 +370,9 @@ test_no_reply (Fixture *f, else g_assert_cmpstr (f->e.message, ==, "Message did not receive a reply (timeout by message bus)"); + + dbus_message_unref (reply); + dbus_pending_call_unref (pc); } static void @@ -529,6 +532,9 @@ test_creds (Fixture *f, #ifdef G_OS_WIN32 g_assert (seen & SEEN_WINDOWS_SID); #endif + + dbus_message_unref (m); + dbus_pending_call_unref (pc); } static void @@ -599,6 +605,9 @@ test_processid (Fixture *f, { g_error ("Unexpected error: %s: %s", error.name, error.message); } + + dbus_message_unref (m); + dbus_pending_call_unref (pc); } static void @@ -644,6 +653,8 @@ test_canonical_path_uae (Fixture *f, DBUS_MESSAGE_TYPE_METHOD_RETURN); dbus_message_unref (m); + dbus_pending_call_unref (pc); + pc = NULL; /* Now try with the wrong object path */ m = dbus_message_new_method_call (DBUS_SERVICE_DBUS, @@ -684,6 +695,7 @@ test_canonical_path_uae (Fixture *f, g_assert_cmpstr (dbus_message_get_signature (m), ==, "s"); dbus_message_unref (m); + dbus_pending_call_unref (pc); } static void -- 2.11.0