mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-28 01:57:14 +02:00
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 221f22b6e1
)
This commit is contained in:
@@ -3283,15 +3283,19 @@ launch_uris_with_dbus_cb (GObject *object,
|
|||||||
{
|
{
|
||||||
GTask *task = G_TASK (user_data);
|
GTask *task = G_TASK (user_data);
|
||||||
GError *error = NULL;
|
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)
|
if (error != NULL)
|
||||||
{
|
{
|
||||||
g_dbus_error_strip_remote_error (error);
|
g_dbus_error_strip_remote_error (error);
|
||||||
g_task_return_error (task, g_steal_pointer (&error));
|
g_task_return_error (task, g_steal_pointer (&error));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
g_task_return_boolean (task, TRUE);
|
{
|
||||||
|
g_task_return_boolean (task, TRUE);
|
||||||
|
g_variant_unref (ret);
|
||||||
|
}
|
||||||
|
|
||||||
g_object_unref (task);
|
g_object_unref (task);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user