mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 15:36:14 +01: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
This commit is contained in:
parent
026a69905e
commit
221f22b6e1
@ -3283,15 +3283,19 @@ launch_uris_with_dbus_cb (GObject *object,
|
|||||||
{
|
{
|
||||||
GTask *task = G_TASK (user_data);
|
GTask *task = G_TASK (user_data);
|
||||||
GError *local_error = NULL;
|
GError *local_error = NULL;
|
||||||
|
GVariant *ret;
|
||||||
|
|
||||||
g_dbus_connection_call_finish (G_DBUS_CONNECTION (object), result, &local_error);
|
ret = g_dbus_connection_call_finish (G_DBUS_CONNECTION (object), result, &local_error);
|
||||||
if (local_error != NULL)
|
if (local_error != NULL)
|
||||||
{
|
{
|
||||||
g_dbus_error_strip_remote_error (local_error);
|
g_dbus_error_strip_remote_error (local_error);
|
||||||
g_task_return_error (task, g_steal_pointer (&local_error));
|
g_task_return_error (task, g_steal_pointer (&local_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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user