1From 221f22b6e18fdd306e676e28a79afd3697bddd03 Mon Sep 17 00:00:00 2001 2From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net> 3Date: Fri, 2 Sep 2022 20:38:46 +0200 4Subject: [PATCH] gdesktopappinfo: Unref the GDBus call results 5 6On our GDBus call callback wrapper we were completing the gdbus call but 7ignoring the returned value, that was always leaked. 8 9Fix this. 10 11Helps with: https://gitlab.gnome.org/GNOME/glib/-/issues/333 12 13Conflict:NA 14Reference:https://gitlab.gnome.org/GNOME/glib/-/commit/221f22b6e18fdd306e676e28a79afd3697bddd03 15 16--- 17 gio/gdesktopappinfo.c | 8 ++++++-- 18 1 file changed, 6 insertions(+), 2 deletions(-) 19 20diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c 21index af2311ca52..52d308f540 100644 22--- a/gio/gdesktopappinfo.c 23+++ b/gio/gdesktopappinfo.c 24@@ -3283,15 +3283,19 @@ launch_uris_with_dbus_cb (GObject *object, 25 { 26 GTask *task = G_TASK (user_data); 27 GError *error = NULL; 28+ GVariant *ret; 29 30- g_dbus_connection_call_finish (G_DBUS_CONNECTION (object), result, &error); 31+ ret = g_dbus_connection_call_finish (G_DBUS_CONNECTION (object), result, &error); 32 if (error != NULL) 33 { 34 g_dbus_error_strip_remote_error (error); 35 g_task_return_error (task, g_steal_pointer (&error)); 36 } 37 else 38- g_task_return_boolean (task, TRUE); 39+ { 40+ g_task_return_boolean (task, TRUE); 41+ g_variant_unref (ret); 42+ } 43 44 g_object_unref (task); 45 } 46-- 47GitLab 48 49