forked from AuroraMiddleware/gtk
[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:
parent
58609cfdaf
commit
eb02dacb37
@ -1551,7 +1551,10 @@ model_free_row_data (GtkFileChooserButton *button,
|
|||||||
-1);
|
-1);
|
||||||
|
|
||||||
if (cancellable)
|
if (cancellable)
|
||||||
|
{
|
||||||
g_cancellable_cancel (cancellable);
|
g_cancellable_cancel (cancellable);
|
||||||
|
g_object_unref (cancellable);
|
||||||
|
}
|
||||||
|
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
|
@ -3195,7 +3195,7 @@ shortcuts_reorder (GtkFileChooserDefault *impl,
|
|||||||
int bookmarks_index;
|
int bookmarks_index;
|
||||||
GFile *file;
|
GFile *file;
|
||||||
GError *error;
|
GError *error;
|
||||||
gchar *name;
|
gchar *name = NULL;
|
||||||
|
|
||||||
/* Get the selected path */
|
/* Get the selected path */
|
||||||
|
|
||||||
@ -3241,6 +3241,7 @@ shortcuts_reorder (GtkFileChooserDefault *impl,
|
|||||||
out:
|
out:
|
||||||
|
|
||||||
g_object_unref (file);
|
g_object_unref (file);
|
||||||
|
g_free (name);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Callback used when we get the drag data for the bookmarks list. We add the
|
/* 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)
|
if (is_folder && file)
|
||||||
{
|
{
|
||||||
change_folder_and_display_error (impl, file, FALSE);
|
change_folder_and_display_error (impl, file, FALSE);
|
||||||
|
g_object_unref (file);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -336,8 +336,9 @@ match_selected_callback (GtkEntryCompletion *completion,
|
|||||||
|
|
||||||
if (!display_name || !file)
|
if (!display_name || !file)
|
||||||
{
|
{
|
||||||
/* these shouldn't complain if passed NULL */
|
if (file)
|
||||||
g_object_unref (file);
|
g_object_unref (file);
|
||||||
|
|
||||||
g_free (display_name);
|
g_free (display_name);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user