diff --git a/a1151bc1.patch b/a1151bc1.patch new file mode 100644 index 0000000..251db87 --- /dev/null +++ b/a1151bc1.patch @@ -0,0 +1,30 @@ +From efb43ef813d90dca48aa01880f097a2161005db1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= +Date: Sun, 23 Oct 2022 17:10:59 +0200 +Subject: [PATCH] gio/gdesktopappinfo: Free the wrapped argv array on launch + failure + +We create an array that we never free, ensure this is the case. +The previous commit gives CI a chance to check this with valgrind job. + +Found as part of another review: + - https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2839#note_1524922 +--- + gio/gdesktopappinfo.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c +index f8cccca025..c29c309478 100644 +--- a/gio/gdesktopappinfo.c ++++ b/gio/gdesktopappinfo.c +@@ -2963,6 +2963,7 @@ g_desktop_app_info_launch_uris_with_spawn (GDesktopAppInfo *info, + + g_free (sn_id); + g_list_free (launched_uris); ++ g_clear_pointer (&wrapped_argv, g_strfreev); + + goto out; + } +-- +GitLab + diff --git a/glib2.changes b/glib2.changes index e42046c..6788f8f 100644 --- a/glib2.changes +++ b/glib2.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Oct 31 15:17:35 UTC 2022 - Bjørn Lie + +- Add a1151bc1.patch: gio/gdesktopappinfo: Free the wrapped argv + array on launch failure. + ------------------------------------------------------------------- Mon Oct 31 12:18:51 UTC 2022 - Dominique Leuenberger diff --git a/glib2.spec b/glib2.spec index 97fd8df..5939dc5 100644 --- a/glib2.spec +++ b/glib2.spec @@ -60,6 +60,8 @@ Patch3: glib2-dbus-socket-path.patch Patch4: glib2-gdbus-codegen-version.patch # PATCH-FIX-UPSTREAM ca905744.patch dimstar@opensuse.org -- Revert "Handling collision between standard i/o file descriptors and newly created ones" Patch5: https://gitlab.gnome.org/GNOME/glib/-/commit/ca905744.patch +# PATCH-FIX-UPSTREAM a1151bc1.patch -- gio/gdesktopappinfo: Free the wrapped argv array on launch failure +Patch6: https://gitlab.gnome.org/GNOME/glib/-/commit/a1151bc1.patch BuildRequires: docbook-xsl-stylesheets BuildRequires: fdupes @@ -264,6 +266,7 @@ the functionality of the installed glib2 package. %patch3 -p1 %patch4 -p1 %patch5 -p1 +%patch6 -p1 cp -a %{SOURCE1} %{SOURCE2} %{SOURCE5} . cp -a %{SOURCE4} gnome_defaults.conf # replace /usr/bin/env shebangs