[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 <mortenw@gnome.org>

https://bugzilla.gnome.org/show_bug.cgi?id=646457
This commit is contained in:
Federico Mena Quintero 2011-04-01 12:44:10 -06:00
parent a77e6b1593
commit 2aad7a5151

View File

@ -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 */