From fb3b5c92f80874ce5f4d3d746a6606c862d3adb2 Mon Sep 17 00:00:00 2001 From: Paolo Borelli Date: Mon, 15 May 2006 06:59:30 +0000 Subject: [PATCH] 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 5f3e73b03..3e4a10aec 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-12 Elijah Newren * configure.in: I don't think we want a config file for the diff --git a/src/prefs.c b/src/prefs.c index 6f5263cdb..d2be470db 100644 --- a/src/prefs.c +++ b/src/prefs.c @@ -2201,10 +2201,9 @@ update_binding (MetaKeyPref *binding, binding->name, value); - old_setting = meta_ui_accelerator_name( - combo->keysym, - combo->modifiers); - + old_setting = meta_ui_accelerator_name (combo->keysym, + combo->modifiers); + if (!strcmp(old_setting, value)) { /* We were about to set it to the same value @@ -2213,6 +2212,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; }