From 187b6a786287ae15f80379aadc7bdc84a7e0b772 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 3 Jul 2018 19:16:44 +0100 Subject: [PATCH 28/38] fixup! containers test: Check that unsolicited replies can't be sent * Use const for array of serial numbers * Fix several leaks --- test/containers.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/containers.c b/test/containers.c index aa08c8b8..0723d614 100644 --- a/test/containers.c +++ b/test/containers.c @@ -2831,7 +2831,7 @@ test_allow_no_unsolicited_replies (Fixture *f, * in allow_tests_message_filter(). */ for (use_error_reply = 0; use_error_reply < 2; use_error_reply++) { - guint32 reply_serials[] = + const guint32 reply_serials[] = { /* The serial number of a message that wasn't meant to get * a reply */ @@ -2880,8 +2880,14 @@ test_allow_no_unsolicited_replies (Fixture *f, * reply was received */ test_sync_gdbus_connections (f->unconfined_conn, f->confined_conns[0]); + g_clear_object (&unsolicited_reply); } } + + g_clear_object (&message_with_reply); + g_clear_object (&message_without_reply); + g_clear_object (&reply_message); + g_clear_object (&result); #else /* !HAVE_CONTAINERS_TEST */ g_test_skip ("Containers or gio-unix-2.0 not supported"); #endif /* !HAVE_CONTAINERS_TEST */ -- 2.18.0