[glib] Fix very small leak in the GSettings test



commit dc7348b305c72c757f8ed1d8ba2cae2a19a3c684
Author: Ryan Lortie <desrt desrt ca>
Date:   Thu Jul 22 11:49:30 2010 -0400

    Fix very small leak in the GSettings test

 gio/tests/gsettings.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gio/tests/gsettings.c b/gio/tests/gsettings.c
index 09c214a..85dd30f 100644
--- a/gio/tests/gsettings.c
+++ b/gio/tests/gsettings.c
@@ -1073,7 +1073,9 @@ test_simple_binding (void)
 
   g_settings_bind (settings, "enum", obj, "enum", G_SETTINGS_BIND_DEFAULT);
   g_object_set (obj, "enum", TEST_ENUM_BAZ, NULL);
-  g_assert_cmpstr (g_settings_get_string (settings, "enum"), ==, "baz");
+  s = g_settings_get_string (settings, "enum");
+  g_assert_cmpstr (s, ==, "baz");
+  g_free (s);
   g_assert_cmpint (g_settings_get_enum (settings, "enum"), ==, TEST_ENUM_BAZ);
 
   g_settings_set_enum (settings, "enum", TEST_ENUM_QUUX);



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