[glib/wip/gcleanup: 75/106] dynamictype: Fix leak in test



commit c15a735ddebabbb1b3542c5e59a8c0ced11cdfe8
Author: Stef Walter <stefw gnome org>
Date:   Sun Nov 10 15:58:24 2013 +0100

    dynamictype: Fix leak in test
    
    https://bugzilla.gnome.org/show_bug.cgi?id=711778

 tests/gobject/dynamictype.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/tests/gobject/dynamictype.c b/tests/gobject/dynamictype.c
index bc003a1..7cf0830 100644
--- a/tests/gobject/dynamictype.c
+++ b/tests/gobject/dynamictype.c
@@ -115,8 +115,9 @@ static void
 test_dynamic_type (void)
 {
   DynamicObjectClass *class;
+  GTypeModule *module;
 
-  test_module_new (module_register);
+  module = test_module_new (module_register);
 
   /* Not loaded until we call ref for the first time */
   class = g_type_class_peek (DYNAMIC_OBJECT_TYPE);
@@ -163,6 +164,8 @@ test_dynamic_type (void)
   g_assert (!class);
   g_assert (!loaded);
 #endif
+
+  g_object_unref (module);
 }
 
 int


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