From 3269b900f8869f7de45465a32d126107e5351b7f Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 31 Jan 2004 15:33:10 +0000 Subject: [PATCH] Don't leak the GtkKeySnooperData. (#132038, R. McFarland) Sat Jan 31 16:27:44 2004 Matthias Clasen * gtk/gtkmain.c (gtk_key_snooper_remove): Don't leak the GtkKeySnooperData. (#132038, R. McFarland) --- ChangeLog | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ ChangeLog.pre-2-4 | 5 +++++ ChangeLog.pre-2-6 | 5 +++++ ChangeLog.pre-2-8 | 5 +++++ gtk/gtkmain.c | 7 +++++-- 6 files changed, 30 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 92de7c462f..66fd290bfc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sat Jan 31 16:27:44 2004 Matthias Clasen + + * gtk/gtkmain.c (gtk_key_snooper_remove): Don't leak the + GtkKeySnooperData. (#132038, R. McFarland) + 2004-01-30 Federico Mena Quintero Fixes #132975. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 92de7c462f..66fd290bfc 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +Sat Jan 31 16:27:44 2004 Matthias Clasen + + * gtk/gtkmain.c (gtk_key_snooper_remove): Don't leak the + GtkKeySnooperData. (#132038, R. McFarland) + 2004-01-30 Federico Mena Quintero Fixes #132975. diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 92de7c462f..66fd290bfc 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,8 @@ +Sat Jan 31 16:27:44 2004 Matthias Clasen + + * gtk/gtkmain.c (gtk_key_snooper_remove): Don't leak the + GtkKeySnooperData. (#132038, R. McFarland) + 2004-01-30 Federico Mena Quintero Fixes #132975. diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 92de7c462f..66fd290bfc 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,8 @@ +Sat Jan 31 16:27:44 2004 Matthias Clasen + + * gtk/gtkmain.c (gtk_key_snooper_remove): Don't leak the + GtkKeySnooperData. (#132038, R. McFarland) + 2004-01-30 Federico Mena Quintero Fixes #132975. diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 92de7c462f..66fd290bfc 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +Sat Jan 31 16:27:44 2004 Matthias Clasen + + * gtk/gtkmain.c (gtk_key_snooper_remove): Don't leak the + GtkKeySnooperData. (#132038, R. McFarland) + 2004-01-30 Federico Mena Quintero Fixes #132975. diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c index 813988fdad..1af4cb1ebc 100644 --- a/gtk/gtkmain.c +++ b/gtk/gtkmain.c @@ -1817,7 +1817,7 @@ gtk_key_snooper_install (GtkKeySnoopFunc snooper, } void -gtk_key_snooper_remove (guint snooper_id) +gtk_key_snooper_remove (guint snooper_id) { GtkKeySnooperData *data = NULL; GSList *slist; @@ -1833,7 +1833,10 @@ gtk_key_snooper_remove (guint snooper_id) data = NULL; } if (data) - key_snoopers = g_slist_remove (key_snoopers, data); + { + key_snoopers = g_slist_remove (key_snoopers, data); + g_free (data); + } } static gint