From 772d96e21f16952c9ba528fa76fef05b4f70ff7f Mon Sep 17 00:00:00 2001 From: Paolo Borelli Date: Mon, 15 May 2006 07:03:52 +0000 Subject: plug a small leak. 2006-05-15 Paolo Borelli * src/prefs.c (update_binding): plug a small leak. --- ChangeLog | 4 ++++ src/prefs.c | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7a89146a..0fb80f31 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2006-05-15 Paolo Borelli + + * src/prefs.c (update_binding): plug a small leak. + 2006-05-01 Wouter Bolsterlee * configure.in: Put ALL_LINGUAS on one line to fix the diff --git a/src/prefs.c b/src/prefs.c index dad0515b..785d2bc2 100644 --- a/src/prefs.c +++ b/src/prefs.c @@ -2061,10 +2061,9 @@ update_binding (MetaKeyPref *binding, binding->name, value); - old_setting = meta_ui_accelerator_name( - binding->keysym, - binding->modifiers); - + old_setting = meta_ui_accelerator_name (binding->keysym, + binding->modifiers); + if (!strcmp(old_setting, value)) { /* We were about to set it to the same value @@ -2073,6 +2072,7 @@ update_binding (MetaKeyPref *binding, * meta_ui_accelerator_name. Bail out now * so we don't get into an infinite loop. */ + g_free (old_setting); return TRUE; } -- cgit v1.2.1