[gnome-settings-daemon] xsettings: Plug a mem leak



commit dff5aa31578b663b49fe722db940003c8aa8b809
Author: Christian Persch <chpe gnome org>
Date:   Wed Nov 2 14:11:33 2011 +0100

    xsettings: Plug a mem leak
    
    ==24379== 69 bytes in 4 blocks are definitely lost in loss record 5,253 of 6,164
    ==24379==    at 0x402AD89: malloc (vg_replace_malloc.c:236)
    ==24379==    by 0x4A62C3B: standard_malloc (gmem.c:88)
    ==24379==    by 0x4A631B0: g_malloc (gmem.c:164)
    ==24379==    by 0x4A526D3: g_key_file_parse_value_as_string (gkeyfile.c:3673)
    ==24379==    by 0x4A543F8: g_key_file_get_string (gkeyfile.c:1438)
    ==24379==    by 0x7DBE13E: get_gtk_modules_from_dir (gsd-xsettings-gtk.c:110)
    
    Bug #663239.

 plugins/xsettings/gsd-xsettings-gtk.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/plugins/xsettings/gsd-xsettings-gtk.c b/plugins/xsettings/gsd-xsettings-gtk.c
index 218fa23..cbc8881 100644
--- a/plugins/xsettings/gsd-xsettings-gtk.c
+++ b/plugins/xsettings/gsd-xsettings-gtk.c
@@ -92,7 +92,7 @@ process_desktop_file (const char      *path,
 {
         GKeyFile *keyfile;
         char *retval;
-        const char *module_name;
+        char *module_name;
 
         retval = NULL;
 
@@ -139,6 +139,8 @@ process_desktop_file (const char      *path,
                 retval = g_strdup (module_name);
         }
 
+	g_free (module_name);
+
 bail:
         g_key_file_free (keyfile);
         return retval;



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