Plug a mem leak in gsettings test
authorChristian Persch <chpe@gnome.org>
Fri, 3 Sep 2010 19:29:51 +0000 (15:29 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 3 Sep 2010 19:29:51 +0000 (15:29 -0400)
==2530== 13 bytes in 1 blocks are definitely lost in loss record 373 of 681
==2530==    at 0x4005BDC: malloc (vg_replace_malloc.c:195)
==2530==    by 0x4057094: g_malloc (gmem.c:134)
==2530==    by 0x40573DB: g_malloc_n (gmem.c:281)
==2530==    by 0x40717FC: g_strdup (gstrfuncs.c:101)
==2530==    by 0x4147F56: value_lcopy_string (gvaluetypes.c:313)
==2530==    by 0x4123F0B: g_object_get_valist (gobject.c:1643)
==2530==    by 0x41240FF: g_object_get (gobject.c:1731)
==2530==    by 0x804A4BA: test_basic (gsettings.c:28)

Bug #628331.

gio/tests/gsettings.c

index 1f6942f..412d909 100644 (file)
@@ -27,6 +27,7 @@ test_basic (void)
 
   g_object_get (settings, "schema", &str, NULL);
   g_assert_cmpstr (str, ==, "org.gtk.test");
+  g_free (str);
 
   g_settings_get (settings, "greeting", "s", &str);
   g_assert_cmpstr (str, ==, "Hello, earthlings");