[glib/wip/gcleanup: 67/79] enums: Fix leaks in tests



commit b3c3400ac3276377e43ae36038bd7f912daf2425
Author: Stef Walter <stefw gnome org>
Date:   Thu Nov 7 22:57:13 2013 +0100

    enums: Fix leaks in tests
    
    https://bugzilla.gnome.org/show_bug.cgi?id=711779

 gobject/tests/enums.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gobject/tests/enums.c b/gobject/tests/enums.c
index bdb5ffb..f8ae42c 100644
--- a/gobject/tests/enums.c
+++ b/gobject/tests/enums.c
@@ -51,6 +51,8 @@ test_enum_basic (void)
   g_assert_cmpint (val->value, ==, 1);
   val = g_enum_get_value_by_nick (class, "purple");
   g_assert (val == NULL);
+
+  g_type_class_unref (class);
 }
 
 static const GFlagsValue my_flag_values[] =
@@ -114,6 +116,8 @@ test_flags_basic (void)
 
   test_flags_transform_to_string (&value);
   g_value_unset (&value);
+
+  g_type_class_unref (class);
 }
 
 int


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