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-bindings.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-bindings.c')
-rw-r--r-- | mate-panel/panel-bindings.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/mate-panel/panel-bindings.c b/mate-panel/panel-bindings.c index a5c2530b..65f0b7e3 100644 --- a/mate-panel/panel-bindings.c +++ b/mate-panel/panel-bindings.c @@ -132,7 +132,9 @@ panel_binding_changed (GSettings *settings, binding->keyval = 0; binding->modifiers = 0; - panel_binding_set_from_string (binding, g_settings_get_string (settings, key)); + gchar *value = g_settings_get_string (settings, key); + panel_binding_set_from_string (binding, value); + g_free (value); if (!binding->keyval) return; @@ -177,7 +179,9 @@ panel_bindings_mouse_modifier_changed (GSettings *settings, gchar *key, gpointer user_data) { - panel_bindings_mouse_modifier_set_from_string (g_settings_get_string (settings, key)); + gchar *value = g_settings_get_string (settings, key); + panel_bindings_mouse_modifier_set_from_string (value); + g_free (value); } static void |