From 8964f6f0cc4f92be4bacf61c676643ab5abb504d Mon Sep 17 00:00:00 2001 From: Sergey Bugaev Date: Tue, 10 Sep 2024 18:28:30 +0300 Subject: [PATCH] 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 --- gtk/gtkfilechooserwidget.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c index dffb2c7bdf..9337afbea2 100644 --- a/gtk/gtkfilechooserwidget.c +++ b/gtk/gtkfilechooserwidget.c @@ -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);