From 35b28ef3ae587f4263ae309c86cac3b2fc0cf9d9 Mon Sep 17 00:00:00 2001 From: sid Date: Tue, 15 Oct 2024 18:37:15 +0100 Subject: [PATCH] snap: Fix crash when uninstalling snap 'app_data' is an argument to both the actual and progress callbacks. In this case, using `g_steal_pointer` on one of them will render the other one to be NULL, causing the crash. Follow the same convention used in install. --- plugins/snap/gs-plugin-snap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/snap/gs-plugin-snap.c b/plugins/snap/gs-plugin-snap.c index 61d42f4b1..dd9ec0e24 100644 --- a/plugins/snap/gs-plugin-snap.c +++ b/plugins/snap/gs-plugin-snap.c @@ -2366,7 +2366,8 @@ gs_plugin_snap_uninstall_apps_async (GsPlugin *plugin, app_data, cancellable, uninstall_app_cb, - g_steal_pointer (&app_data)); + app_data /* steal ownership */); + app_data = NULL; } finish_uninstall_apps_op (task, NULL); -- GitLab