summaryrefslogtreecommitdiff
path: root/gtk/gtktreemodel.c
diff options
context:
space:
mode:
authorKristian Rietveld <kristian@planet.nl>2001-11-24 17:32:27 +0000
committerKristian Rietveld <kristian@src.gnome.org>2001-11-24 17:32:27 +0000
commitb95c4f0bb393bd91cb04df6c5f6f608ba2f30c48 (patch)
tree882be283dedaa41931885a1db1bb8703b8236462 /gtk/gtktreemodel.c
parent4da8e00b62f24d65d8c97be5aea43e1a5dae3a37 (diff)
downloadgtk+-b95c4f0bb393bd91cb04df6c5f6f608ba2f30c48.tar.gz
free path before we return (in case of a failure here)
Sat Nov 24 15:35:26 2001 Kristian Rietveld <kristian@planet.nl> * gtk/gtktreemodel.c (gtk_tree_model_foreach): free path before we return (in case of a failure here)
Diffstat (limited to 'gtk/gtktreemodel.c')
-rw-r--r--gtk/gtktreemodel.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gtk/gtktreemodel.c b/gtk/gtktreemodel.c
index e71c5b26fd..05b2c4747e 100644
--- a/gtk/gtktreemodel.c
+++ b/gtk/gtktreemodel.c
@@ -1169,7 +1169,10 @@ gtk_tree_model_foreach (GtkTreeModel *model,
path = gtk_tree_path_new_root ();
if (gtk_tree_model_get_iter (model, &iter, path) == FALSE)
- return;
+ {
+ gtk_tree_path_free (path);
+ return;
+ }
gtk_tree_model_foreach_helper (model, &iter, path, func, user_data);
gtk_tree_path_free (path);