[glib] tests: Fix some memory leaks in the GSettings unit tests



commit d892cf6feb215b3e2349b437c02d561926ea8259
Author: Philip Withnall <withnall endlessm com>
Date:   Mon Feb 27 10:08:16 2017 +0000

    tests: Fix some memory leaks in the GSettings unit tests
    
    Signed-off-by: Philip Withnall <withnall endlessm com>
    
    https://bugzilla.gnome.org/show_bug.cgi?id=779265

 gio/tests/gsettings.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gio/tests/gsettings.c b/gio/tests/gsettings.c
index dfd4ee4..b1bbd4e 100644
--- a/gio/tests/gsettings.c
+++ b/gio/tests/gsettings.c
@@ -2438,6 +2438,8 @@ test_actions (void)
   g_assert_cmpstr (g_variant_get_string (state, NULL), ==, "kthxbye");
 
   g_free (name);
+  g_variant_type_free (param_type);
+  g_variant_type_free (state_type);
   g_variant_unref (state);
 
   g_object_unref (string);
@@ -2627,6 +2629,7 @@ main (int argc, char *argv[])
 
       g_assert (g_file_get_contents (SRCDIR "/org.gtk.test.gschema.xml.orig", &schema_text, NULL, NULL));
       g_assert (g_file_set_contents ("org.gtk.test.gschema.xml", schema_text, -1, NULL));
+      g_free (schema_text);
 
       g_remove ("gschemas.compiled");
       g_assert (g_spawn_command_line_sync ("../glib-compile-schemas --targetdir=. "


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