From eb0515688e368e97fdf93b1083b233f0ae732948 Mon Sep 17 00:00:00 2001 From: monsta Date: Sun, 2 Nov 2014 11:36:43 +0300 Subject: don't leak memory --- plugins/xsettings/msd-xsettings-manager.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/xsettings/msd-xsettings-manager.c b/plugins/xsettings/msd-xsettings-manager.c index 8c1b9fb..9c91e82 100644 --- a/plugins/xsettings/msd-xsettings-manager.c +++ b/plugins/xsettings/msd-xsettings-manager.c @@ -407,7 +407,7 @@ update_property (GString *props, const gchar* key, const gchar* value) if (g_str_has_prefix (props->str, needle)) found = props->str; else - found = strstr (props->str, needle); + found = strstr (props->str, needle); if (found) { size_t value_index; @@ -421,6 +421,8 @@ update_property (GString *props, const gchar* key, const gchar* value) } else { g_string_append_printf (props, "%s:\t%s\n", key, value); } + + g_free (needle); } static void -- cgit v1.2.1