[glib] gdbus-introspection: Fix leaks in tests
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gdbus-introspection: Fix leaks in tests
- Date: Mon, 11 Nov 2013 07:53:21 +0000 (UTC)
commit 14b27eaab88e8c8860461fb98ede7eb14a510d46
Author: Stef Walter <stefw gnome org>
Date: Sat Nov 9 20:23:15 2013 +0100
gdbus-introspection: Fix leaks in tests
https://bugzilla.gnome.org/show_bug.cgi?id=711802
gio/tests/gdbus-introspection.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/gio/tests/gdbus-introspection.c b/gio/tests/gdbus-introspection.c
index 627ea99..f2b268d 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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]