[gnome-settings-daemon] xsettings: Plug a mem leak
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] xsettings: Plug a mem leak
- Date: Thu, 3 Nov 2011 11:11:09 +0000 (UTC)
commit 9314b09b05e4122dc8cc4633b72f359f24382360
Author: Christian Persch <chpe gnome org>
Date: Wed Nov 2 14:14:02 2011 +0100
xsettings: Plug a mem leak
==24379== 88 bytes in 3 blocks are definitely lost in loss record 5,392 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 0x7DBE1FB: get_gtk_modules_from_dir (gsd-xsettings-gtk.c:121)
==24379== 59 bytes in 3 blocks are definitely lost in loss record 5,034 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 0x7DBE223: get_gtk_modules_from_dir (gsd-xsettings-gtk.c:122)
Bug #663239.
plugins/xsettings/gsd-xsettings-gtk.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/plugins/xsettings/gsd-xsettings-gtk.c b/plugins/xsettings/gsd-xsettings-gtk.c
index cbc8881..d0b94da 100644
--- a/plugins/xsettings/gsd-xsettings-gtk.c
+++ b/plugins/xsettings/gsd-xsettings-gtk.c
@@ -112,8 +112,8 @@ process_desktop_file (const char *path,
goto bail;
if (g_key_file_has_key (keyfile, "GTK Module", "X-GTK-Module-Enabled-Schema", NULL) != FALSE) {
- const char *schema;
- const char *key;
+ char *schema;
+ char *key;
gboolean enabled;
GSettings *settings;
char *signal;
@@ -132,6 +132,8 @@ process_desktop_file (const char *path,
g_signal_connect (G_OBJECT (settings), signal,
G_CALLBACK (cond_setting_changed), gtk);
g_free (signal);
+ g_free (schema);
+ g_free (key);
if (enabled != FALSE)
retval = g_strdup (module_name);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]