defaultiface: Fix leak in test
authorStef Walter <stefw@gnome.org>
Sun, 10 Nov 2013 14:58:06 +0000 (15:58 +0100)
committerStef Walter <stefw@gnome.org>
Mon, 11 Nov 2013 06:27:22 +0000 (07:27 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=711779

tests/gobject/defaultiface.c

index c44c18a..12944b0 100644 (file)
@@ -141,8 +141,9 @@ static void
 test_dynamic_iface (void)
 {
   TestDynamicIfaceClass *dynamic_iface;
+  GTypeModule *module;
 
-  test_module_new (module_register);
+  module = test_module_new (module_register);
 
   /* Not loaded until we call ref for the first time */
   dynamic_iface = g_type_default_interface_peek (TEST_TYPE_DYNAMIC_IFACE);
@@ -179,6 +180,8 @@ test_dynamic_iface (void)
 #if 0
   g_assert (!dynamic_iface_init);
 #endif
+
+  g_object_unref (module);
 }
 
 int