[glib/wip/gcleanup] gdbus-connection-slow: Fix leak in tests



commit 91213cad0402b1c8f1e7e6946fad7ba3b5c7df5c
Author: Stef Walter <stefw gnome org>
Date:   Sat Nov 9 20:21:16 2013 +0100

    gdbus-connection-slow: Fix leak in tests

 gio/tests/gdbus-connection-slow.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/gio/tests/gdbus-connection-slow.c b/gio/tests/gdbus-connection-slow.c
index 981caf0..1ceb4e2 100644
--- a/gio/tests/gdbus-connection-slow.c
+++ b/gio/tests/gdbus-connection-slow.c
@@ -215,6 +215,8 @@ int
 main (int   argc,
       char *argv[])
 {
+  gint ret;
+
   g_test_init (&argc, &argv, NULL);
 
   /* all the tests rely on a shared main loop */
@@ -224,5 +226,8 @@ main (int   argc,
 
   g_test_add_func ("/gdbus/connection/flush", test_connection_flush);
   g_test_add_func ("/gdbus/connection/large_message", test_connection_large_message);
-  return g_test_run();
+
+  ret = g_test_run();
+  g_main_loop_unref (loop);
+  return ret;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]