]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
test/containers: Fix some memory leaks
authorSimon McVittie <smcv@collabora.com>
Thu, 12 Jul 2018 13:23:06 +0000 (14:23 +0100)
committerSimon McVittie <smcv@collabora.com>
Thu, 2 Aug 2018 16:16:27 +0000 (17:16 +0100)
Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=107194

test/containers.c

index dd1104ea5392a0215132e9fa45b0dff491f4bc0f..eb7025229c829ef7e061fd2b8dd1fc49a34ff76c 100644 (file)
@@ -1079,6 +1079,7 @@ test_stop_server (Fixture *f,
   g_free (error_name);
   g_assert_null (tuple);
   g_clear_error (&f->error);
+  g_clear_object (&socket_address);
 
 #else /* !HAVE_CONTAINERS_TEST */
   g_test_skip ("Containers or gio-unix-2.0 not supported");
@@ -1548,6 +1549,9 @@ test_max_connections_per_container (Fixture *f,
       g_clear_object (&socket_addresses[i]);
     }
 
+  for (i = 0; i < G_N_ELEMENTS (placeholders); i++)
+    g_clear_object (&placeholders[i]);
+
 #undef LIMIT
 #else /* !HAVE_CONTAINERS_TEST */
   g_test_skip ("Containers or gio-unix-2.0 not supported");