[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
This commit is contained in:
Federico Mena Quintero 2011-04-01 16:16:17 -06:00
parent 58609cfdaf
commit eb02dacb37
3 changed files with 10 additions and 4 deletions

View File

@ -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)
{

View File

@ -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;
}

View File

@ -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;
}