[glib/wip/gcleanup] mainloop-test: Fix leaks in tests



commit 7f1b9950b57645aad66201f8f62a890c8f0f0972
Author: Stef Walter <stefw gnome org>
Date:   Sat Nov 9 20:30:11 2013 +0100

    mainloop-test: Fix leaks in tests

 tests/mainloop-test.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/tests/mainloop-test.c b/tests/mainloop-test.c
index 7e5d4de..5d30550 100644
--- a/tests/mainloop-test.c
+++ b/tests/mainloop-test.c
@@ -190,6 +190,7 @@ adder_thread (gpointer data)
   g_mutex_unlock (&context_array_mutex);
 
   cleanup_crawlers (context);
+  g_main_context_unref (context);
 
   return NULL;
 }
@@ -430,5 +431,8 @@ main (int   argc,
   g_main_loop_run (main_loop);
   g_main_loop_unref (main_loop);
 
+  g_ptr_array_unref (crawler_array);
+  g_ptr_array_unref (context_array);
+
   return 0;
 }


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