From aee2df8b964c2e4bce115c1e8a3e72df07870080 Mon Sep 17 00:00:00 2001 From: Alexander Schwinn <alexxcons@xfce.org> Date: Tue, 7 Feb 2023 09:37:16 +0100 Subject: [PATCH] Fix use after free fault (#1031) Was resulting in Critical Message when executing Launcher on desktop --- thunar/thunar-application.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/thunar/thunar-application.c b/thunar/thunar-application.c index 66d9f39ab..210aaa5b1 100644 --- a/thunar/thunar-application.c +++ b/thunar/thunar-application.c @@ -1673,9 +1673,6 @@ thunar_application_process_files_finish (ThunarBrowser *browser, application->files_to_launch = g_list_delete_link (application->files_to_launch, application->files_to_launch); - /* release the file */ - g_object_unref (file); - /* check if we have more files to process */ if (application->files_to_launch != NULL) { @@ -1688,6 +1685,9 @@ thunar_application_process_files_finish (ThunarBrowser *browser, if (startup_id != NULL) g_object_set_qdata (G_OBJECT (file), thunar_application_startup_id_quark, NULL); + /* release the file */ + g_object_unref (file); + /* release the application */ g_application_release (G_APPLICATION (application)); } -- GitLab