Commit 2c873894 authored by Miloslav Trmač's avatar Miloslav Trmač

Fix duplicate GError use when "uid" is missing

Some GLib versions complain loudly about this.

To reproduce, call e.g. RegisterAuthenticationAgent with the following
parameters:
("unix-process", {"pid": __import__('gi.repository.GLib', globals(),
locals(), ['Variant']).Variant("u", 1), "start-time":
__import__('gi.repository.GLib', globals(), locals(),
['Variant']).Variant("t", 1)}), "cs", "/"

https://bugs.freedesktop.org/show_bug.cgi?id=90877
parent 2a6aa19c
......@@ -428,7 +428,7 @@ polkit_subject_new_for_gvariant (GVariant *variant,
start_time = g_variant_get_uint64 (v);
g_variant_unref (v);
v = lookup_asv (details_gvariant, "uid", G_VARIANT_TYPE_INT32, error);
v = lookup_asv (details_gvariant, "uid", G_VARIANT_TYPE_INT32, NULL);
if (v != NULL)
{
uid = g_variant_get_int32 (v);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment