From 290861bffe9b71d5cc69d6966a16a212671e225a Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 13 Apr 2004 19:01:06 +0000 Subject: [PATCH] Don't leak list nodes. (#138862, Morten Welinder) 2004-04-13 Matthias Clasen * gtk/gtkuimanager.c (node_remove_ui_reference): Don't leak list nodes. (#138862, Morten Welinder) --- ChangeLog | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ ChangeLog.pre-2-4 | 5 +++++ ChangeLog.pre-2-6 | 5 +++++ ChangeLog.pre-2-8 | 5 +++++ gtk/gtkuimanager.c | 12 ++++++------ 6 files changed, 31 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index fe92f56f7d..568d5b601a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-04-13 Matthias Clasen + + * gtk/gtkuimanager.c (node_remove_ui_reference): Don't leak + list nodes. (#138862, Morten Welinder) + Tue Apr 13 12:24:49 2004 Jonathan Blandford * gtk/gtktreeview.c (gtk_tree_view_destroy): remove unused diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index fe92f56f7d..568d5b601a 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +2004-04-13 Matthias Clasen + + * gtk/gtkuimanager.c (node_remove_ui_reference): Don't leak + list nodes. (#138862, Morten Welinder) + Tue Apr 13 12:24:49 2004 Jonathan Blandford * gtk/gtktreeview.c (gtk_tree_view_destroy): remove unused diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index fe92f56f7d..568d5b601a 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,8 @@ +2004-04-13 Matthias Clasen + + * gtk/gtkuimanager.c (node_remove_ui_reference): Don't leak + list nodes. (#138862, Morten Welinder) + Tue Apr 13 12:24:49 2004 Jonathan Blandford * gtk/gtktreeview.c (gtk_tree_view_destroy): remove unused diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index fe92f56f7d..568d5b601a 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,8 @@ +2004-04-13 Matthias Clasen + + * gtk/gtkuimanager.c (node_remove_ui_reference): Don't leak + list nodes. (#138862, Morten Welinder) + Tue Apr 13 12:24:49 2004 Jonathan Blandford * gtk/gtktreeview.c (gtk_tree_view_destroy): remove unused diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index fe92f56f7d..568d5b601a 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +2004-04-13 Matthias Clasen + + * gtk/gtkuimanager.c (node_remove_ui_reference): Don't leak + list nodes. (#138862, Morten Welinder) + Tue Apr 13 12:24:49 2004 Jonathan Blandford * gtk/gtktreeview.c (gtk_tree_view_destroy): remove unused diff --git a/gtk/gtkuimanager.c b/gtk/gtkuimanager.c index a22baa51d5..f1fde1382b 100644 --- a/gtk/gtkuimanager.c +++ b/gtk/gtkuimanager.c @@ -989,7 +989,7 @@ node_remove_ui_reference (Node *node, if (reference->merge_id == merge_id) { - node->uifiles = g_list_remove_link (node->uifiles, p); + node->uifiles = g_list_delete_link (node->uifiles, p); node->dirty = TRUE; g_free (reference); @@ -1400,17 +1400,17 @@ add_ui_from_string (GtkUIManager *self, if (needs_root) if (!g_markup_parse_context_parse (context, "", -1, error)) - goto error; + goto out; if (!g_markup_parse_context_parse (context, buffer, length, error)) - goto error; + goto out; if (needs_root) if (!g_markup_parse_context_parse (context, "", -1, error)) - goto error; + goto out; if (!g_markup_parse_context_end_parse (context, error)) - goto error; + goto out; g_markup_parse_context_free (context); @@ -1420,7 +1420,7 @@ add_ui_from_string (GtkUIManager *self, return ctx.merge_id; - error: + out: g_markup_parse_context_free (context);