From e87b469285b4f22cadfdd4b52dd3f620422b9b0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20Trma=C4=8D?= Date: Mon, 15 Sep 2014 19:45:15 +0200 Subject: [PATCH] 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 --- src/polkit/polkitsubject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/polkit/polkitsubject.c b/src/polkit/polkitsubject.c index b86e0b9..df8e1aa 100644 --- a/src/polkit/polkitsubject.c +++ b/src/polkit/polkitsubject.c @@ -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); -- 2.4.2