resources: tests: Plug a mem leak
authorChristian Persch <chpe@gnome.org>
Sun, 5 Feb 2012 15:14:21 +0000 (16:14 +0100)
committerChristian Persch <chpe@gnome.org>
Sun, 5 Feb 2012 18:57:10 +0000 (19:57 +0100)
==28318== 38 (12 direct, 26 indirect) bytes in 1 blocks are definitely lost in loss record 613 of 865
==28318==    at 0x402AD89: malloc (vg_replace_malloc.c:236)
==28318==    by 0x4084724: standard_malloc (gmem.c:85)
==28318==    by 0x40847C7: g_malloc (gmem.c:159)
==28318==    by 0x4084AB4: g_malloc_n (gmem.c:361)
==28318==    by 0x4229599: g_resources_enumerate_children (gresource.c:806)
==28318==    by 0x804B39E: test_resource_registred (resources.c:283)

gio/tests/resources.c

index 73229c0..84ab854 100644 (file)
@@ -286,6 +286,7 @@ test_resource_registred (void)
   g_assert (children != NULL);
   g_assert_no_error (error);
   g_assert_cmpint (g_strv_length (children), ==, 2);
+  g_strfreev (children);
 
   g_resources_unregister (resource);