filechooser: Plug a leak

gtk_file_chooser_get_current_folder () is transfer full, while
g_list_store_append () is transfer none.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
This commit is contained in:
Sergey Bugaev 2024-09-10 18:28:30 +03:00
parent 97a2c3a656
commit 8964f6f0cc

View File

@ -4787,7 +4787,10 @@ gtk_file_chooser_widget_get_files (GtkFileChooser *chooser)
current_folder = gtk_file_chooser_get_current_folder (chooser);
if (current_folder)
g_list_store_append (result, current_folder);
{
g_list_store_append (result, current_folder);
g_object_unref (current_folder);
}
}
return G_LIST_MODEL (result);