timeloop-closure: Fix leaks in test
[platform/upstream/glib.git] / tests / gobject / paramspec-test.c
index b0d4240..5b2e834 100644 (file)
@@ -196,6 +196,7 @@ test_param_spec_override (void)
   g_assert (modified && g_value_get_char (&value) == 40);
 
   g_param_spec_unref (pspec);
+  g_param_spec_unref (ospec);
 }
 
 static void
@@ -220,6 +221,8 @@ test_param_spec_gtype (void)
   g_value_set_gtype (&value, G_TYPE_PARAM_INT);
   modified = g_param_value_validate (pspec, &value);
   g_assert (!modified && g_value_get_gtype (&value) == G_TYPE_PARAM_INT);
+
+  g_param_spec_unref (pspec);
 }
 
 static void
@@ -256,7 +259,6 @@ int
 main (int argc, char *argv[])
 {
   g_test_init (&argc, &argv, NULL);
-  g_type_init ();
 
   g_test_add_func ("/paramspec/char", test_param_spec_char);
   g_test_add_func ("/paramspec/string", test_param_spec_string);