Created attachment 33518 [details] [review] initialize relevant GError's to NULL Hi, I've been debugging a packagekit backend for my distribution (Arch Linux) and came across a GLib warning about setting a GError twice. I did a grep for uninitialized GError's and found lots in src/pk-transaction.c, which I assume was why the warnings occured. Attached is a patch to fix this. There are a few others occurences of this in other files but none of them matter because the errors are set directly with g_error_new. However I think it would perhaps be better practice to consistently use g_set_error instead, so that if more code gets added to those functions this bug will not be reintroduced.
I forgot to mention, this patch is against 0.6.1. The problem still exists in git master though (e.g. on line 2873), and hopefully the patch will still work
commit fb4669c72d0e17065c9aecb30ddb746099bcbef2 Author: Jonathan Conder <j@skurvy.no-ip.org> Date: Wed Feb 24 07:57:47 2010 +0000 Initialize relevant GError's to NULL Hi, I've been debugging a packagekit backend for my distribution (Arch Linux) and came across a GLib warning about setting a GError twice. I did a grep for uninitialized GError's and found lots in src/pk-transaction.c, which I assume was why the warnings occured. Attached is a patch to fix this. Signed-off-by: Richard Hughes <richard@hughsie.com>
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.