From 35c6e9a25c47c94fac8a7955f398321946e6a3d1 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Fri, 8 Aug 2003 17:31:54 +0000 Subject: Fix mem leaks. 2003-08-08 Christian Persch * lib/egg/eggtreemodelfilter.c: (egg_tree_model_filter_row_inserted): Fix mem leaks. --- ChangeLog | 6 ++++++ lib/egg/eggtreemodelfilter.c | 9 +++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index e45a5debc..2b2090d74 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-08-08 Christian Persch + + * lib/egg/eggtreemodelfilter.c: (egg_tree_model_filter_row_inserted): + + Fix mem leaks. + 2003-08-08 Christian Persch * embed/print-dialog.c: (print_free_info), (print_get_inf): diff --git a/lib/egg/eggtreemodelfilter.c b/lib/egg/eggtreemodelfilter.c index 4358b94e9..924f6938e 100644 --- a/lib/egg/eggtreemodelfilter.c +++ b/lib/egg/eggtreemodelfilter.c @@ -1097,7 +1097,7 @@ egg_tree_model_filter_row_inserted (GtkTreeModel *c_model, { EggTreeModelFilter *filter = EGG_TREE_MODEL_FILTER (data); GtkTreePath *path; - GtkTreePath *real_path; + GtkTreePath *real_path = NULL; GtkTreeIter iter; GtkTreeIter real_c_iter; @@ -1276,14 +1276,19 @@ done_and_emit: FALSE, TRUE); if (!path) - return; + goto done; egg_tree_model_filter_increment_stamp (filter); gtk_tree_model_get_iter (GTK_TREE_MODEL (data), &iter, path); gtk_tree_model_row_inserted (GTK_TREE_MODEL (data), path, &iter); + gtk_tree_path_free (path); + done: + if (real_path) + gtk_tree_path_free (real_path); + if (free_c_path) gtk_tree_path_free (c_path); } -- cgit v1.2.3