[filechooser] Free things which got duplicated or reffed by gtk_tree_model_get()

We had forgotten to do that in a few places; this is a systematic search for those.

https://bugzilla.gnome.org/show_bug.cgi?id=646461
parent 58609cfd
......@@ -1551,7 +1551,10 @@ model_free_row_data (GtkFileChooserButton *button,
-1);
if (cancellable)
g_cancellable_cancel (cancellable);
{
g_cancellable_cancel (cancellable);
g_object_unref (cancellable);
}
switch (type)
{
......
......@@ -3195,7 +3195,7 @@ shortcuts_reorder (GtkFileChooserDefault *impl,
int bookmarks_index;
GFile *file;
GError *error;
gchar *name;
gchar *name = NULL;
/* Get the selected path */
......@@ -3241,6 +3241,7 @@ shortcuts_reorder (GtkFileChooserDefault *impl,
out:
g_object_unref (file);
g_free (name);
}
/* Callback used when we get the drag data for the bookmarks list. We add the
......@@ -10035,6 +10036,7 @@ list_row_activated (GtkTreeView *tree_view,
if (is_folder && file)
{
change_folder_and_display_error (impl, file, FALSE);
g_object_unref (file);
goto out;
}
......
......@@ -336,8 +336,9 @@ match_selected_callback (GtkEntryCompletion *completion,
if (!display_name || !file)
{
/* these shouldn't complain if passed NULL */
g_object_unref (file);
if (file)
g_object_unref (file);
g_free (display_name);
return FALSE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment