[glib/wip/resources] resource: Plug a mem leak



commit bb0964dacf39b11011501b499bd021914fbe74a4
Author: Christian Persch <chpe gnome org>
Date:   Wed Jan 11 13:41:26 2012 +0100

    resource: Plug a mem leak
    
    ==11685== 33 bytes in 3 blocks are definitely lost in loss record 161 of 295
    ==11685==    at 0x402AD89: malloc (vg_replace_malloc.c:236)
    ==11685==    by 0x407DD4A: standard_malloc (gmem.c:85)
    ==11685==    by 0x407E0F0: g_malloc (gmem.c:159)
    ==11685==    by 0x4093B57: g_strconcat (gstrfuncs.c:581)
    ==11685==    by 0x4205F73: g_resource_enumerate_children (gresource.c:370)
    ==11685==    by 0x42063FA: g_resources_enumerate_children (gresource.c:518)

 gio/gresource.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/gio/gresource.c b/gio/gresource.c
index bc11565..e6f2999 100644
--- a/gio/gresource.c
+++ b/gio/gresource.c
@@ -372,6 +372,7 @@ g_resource_enumerate_children (GResource *resource,
     path_with_slash = g_strdup (path);
 
   children = gvdb_table_list (resource->table, path_with_slash);
+  g_free (path_with_slash);
 
   if (children == NULL)
     {



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