[glib/glib-2-72: 10/39] gdesktopappinfo: Unref the GDBus call results
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/glib-2-72: 10/39] gdesktopappinfo: Unref the GDBus call results
- Date: Tue, 20 Sep 2022 19:07:38 +0000 (UTC)
commit af10448a05a873303a75bda01fd31c5cda82e5dd
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date: Fri Sep 2 20:38:46 2022 +0200
gdesktopappinfo: Unref the GDBus call results
On our GDBus call callback wrapper we were completing the gdbus call but
ignoring the returned value, that was always leaked.
Fix this.
Helps with: https://gitlab.gnome.org/GNOME/glib/-/issues/333
(cherry-picked from commit 221f22b6e18fdd306e676e28a79afd3697bddd03)
gio/gdesktopappinfo.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c
index 6416c6a085..a355745163 100644
--- a/gio/gdesktopappinfo.c
+++ b/gio/gdesktopappinfo.c
@@ -3283,15 +3283,19 @@ launch_uris_with_dbus_cb (GObject *object,
{
GTask *task = G_TASK (user_data);
GError *error = NULL;
+ GVariant *ret;
- g_dbus_connection_call_finish (G_DBUS_CONNECTION (object), result, &error);
+ ret = g_dbus_connection_call_finish (G_DBUS_CONNECTION (object), result, &error);
if (error != NULL)
{
g_dbus_error_strip_remote_error (error);
g_task_return_error (task, g_steal_pointer (&error));
}
else
- g_task_return_boolean (task, TRUE);
+ {
+ g_task_return_boolean (task, TRUE);
+ g_variant_unref (ret);
+ }
g_object_unref (task);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]