[glib] resources: tests: Plug a mem leak



commit 04df4d45a47d653c24c75f321fe7b017b2d47a68
Author: Christian Persch <chpe gnome org>
Date:   Sun Feb 5 16:44:10 2012 +0100

    resources: tests: Plug a mem leak
    
    ==1265== 84 (8 direct, 76 indirect) bytes in 1 blocks are definitely lost in loss record 793 of 827
    ==1265==    at 0x4029467: calloc (vg_replace_malloc.c:467)
    ==1265==    by 0x408479B: standard_calloc (gmem.c:104)
    ==1265==    by 0x4084846: g_malloc0 (gmem.c:189)
    ==1265==    by 0x4084B2D: g_malloc0_n (gmem.c:385)
    ==1265==    by 0x4228A98: g_resource_load (gresource.c:253)
    ==1265==    by 0x804A56D: test_resource_registred (resources.c:198)

 gio/tests/resources.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/gio/tests/resources.c b/gio/tests/resources.c
index 7619f7f..0687e38 100644
--- a/gio/tests/resources.c
+++ b/gio/tests/resources.c
@@ -293,6 +293,7 @@ test_resource_registred (void)
   g_strfreev (children);
 
   g_resources_unregister (resource);
+  g_resource_unref (resource);
 
   found = g_resources_get_info ("/test1.txt",
 				G_RESOURCE_LOOKUP_FLAGS_NONE,



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