gdbus-introspection: Fix leaks in tests

https://bugzilla.gnome.org/show_bug.cgi?id=711802
This commit is contained in:
Stef Walter 2013-11-09 20:23:15 +01:00
parent e34d74bdb3
commit 14b27eaab8

View File

@ -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;
}