[patch] fix uninitialised GError

Richard Hughes ee21rh at surrey.ac.uk
Wed Feb 2 10:23:56 PST 2005


On my laptop I have no sleep button. When I run:

./hald --daemon=no --verbose=yes

I get:

(process:13659): GLib-WARNING **: GError set over the top of a previous
GError or uninitialized memory. This indicates a bug in someone's code.
You must ensure an error is NULL before it's set. The overwriting error
message was: Error opening directory '/proc/acpi/button/sleep': No such
file or directory 18:14:32.497 [E] acpi.c:154: Couldn't open
/proc/acpi/button/sleep

Fix is trivial:

-       GError *error;
+       GError *error = NULL;

Patch here.

http://hughsie.no-ip.com/write/hal/gerror-acpi-fix.patch

Richard.

-- 

http://www.hughsie.com/PUBLIC-KEY


_______________________________________________
hal mailing list
hal at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/hal



More information about the Hal mailing list