From 2aad7a515119548f4cbf8c43afeeb0c18db4d17b Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Fri, 1 Apr 2011 12:44:10 -0600 Subject: [PATCH] [filechooser] Don't add extra ref to file, as it it comes from gtk_tree_model_get() Leak kindly reported by leak finder extraordinaire Morten Welinder https://bugzilla.gnome.org/show_bug.cgi?id=646457 --- gtk/gtkfilechooserdefault.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c index 9c6c717739..849bd7321d 100644 --- a/gtk/gtkfilechooserdefault.c +++ b/gtk/gtkfilechooserdefault.c @@ -8732,7 +8732,7 @@ search_selected_foreach_get_file_cb (GtkTreeModel *model, list = data; gtk_tree_model_get (model, iter, MODEL_COL_FILE, &file, -1); - *list = g_slist_prepend (*list, g_object_ref (file)); + *list = g_slist_prepend (*list, file); /* The file already has a new ref courtesy of gtk_tree_model_get(); this will be unreffed by the caller */ } /* Constructs a list of the selected paths in search mode */