diff options
author | Denis Gorodnichev <[email protected]> | 2014-02-21 16:58:58 +0400 |
---|---|---|
committer | Denis Gorodnichev <[email protected]> | 2014-02-21 17:09:28 +0400 |
commit | 328c01a32417c802457161b0a916b57b35635ea6 (patch) | |
tree | 1ee8640af3bfe7acff602200613f135e37b94e60 /mate-panel/panel-profile.c | |
parent | da3ae79722e7dde4fa99134ea2b9ad0cea014a63 (diff) | |
download | mate-panel-328c01a32417c802457161b0a916b57b35635ea6.tar.bz2 mate-panel-328c01a32417c802457161b0a916b57b35635ea6.tar.xz |
memory leaks
g_settings_get_string returns newly-allocated string
Diffstat (limited to 'mate-panel/panel-profile.c')
-rw-r--r-- | mate-panel/panel-profile.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/mate-panel/panel-profile.c b/mate-panel/panel-profile.c index b5504a7e..f6299af8 100644 --- a/mate-panel/panel-profile.c +++ b/mate-panel/panel-profile.c @@ -784,8 +784,9 @@ panel_profile_toplevel_change_notify (GSettings *settings, #define UPDATE_STRING(k, n) \ if (!strcmp (key, k)) { \ - panel_toplevel_set_##n (toplevel, \ - g_settings_get_string (settings, key)); \ + gchar *value = g_settings_get_string (settings, key); \ + panel_toplevel_set_##n (toplevel, value); \ + g_free (value); \ } #define UPDATE_ENUM(k, n) \ @@ -915,8 +916,9 @@ panel_profile_background_change_notify (GSettings *settings, panel_background_set_opacity (background, g_settings_get_int (settings, key)); } else if (!strcmp (key, "image")) { - panel_background_set_image (background, - g_settings_get_string (settings, key)); + gchar *value = g_settings_get_string (settings, key); + panel_background_set_image (background, value); + g_free (value); } else if (!strcmp (key, "fit")) { panel_background_set_fit (background, g_settings_get_boolean (settings, key)); |