From 14b27eaab88e8c8860461fb98ede7eb14a510d46 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Sat, 9 Nov 2013 20:23:15 +0100 Subject: [PATCH] gdbus-introspection: Fix leaks in tests https://bugzilla.gnome.org/show_bug.cgi?id=711802 --- gio/tests/gdbus-introspection.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gio/tests/gdbus-introspection.c b/gio/tests/gdbus-introspection.c index 627ea99db..f2b268de2 100644 --- a/gio/tests/gdbus-introspection.c +++ b/gio/tests/gdbus-introspection.c @@ -303,6 +303,8 @@ int main (int argc, char *argv[]) { + gint ret; + g_test_init (&argc, &argv, NULL); /* all the tests rely on a shared main loop */ @@ -313,5 +315,10 @@ main (int argc, g_test_add_func ("/gdbus/introspection-default-direction", test_default_direction); g_test_add_func ("/gdbus/introspection-extra-data", test_extra_data); - return session_bus_run (); + ret = session_bus_run (); + + while (g_main_context_iteration (NULL, FALSE)); + g_main_loop_unref (loop); + + return ret; }