qemu-e2k/qom
Markus Armbruster 4715d42efe qom: Do not reuse errp after a possible error
The argument for an Error **errp parameter must point to a null
pointer.  If it doesn't, and an error happens, error_set() fails its
assertion.

Instead of

    foo(foos, errp);
    bar(bars, errp);

you need to do something like

    Error *err = NULL;

    foo(foos, &err);
    if (err) {
        error_propagate(errp, err);
        goto out;
    }

    bar(bars, errp);
out:

Screwed up in commit 0e55884 (v1.3.0): property_get_bool().

Screwed up in commit 1f21772 (v2.1.0): object_property_get_enum() and
object_property_get_uint16List().

Screwed up in commit a8e3fbe (v2.4.0): property_get_enum(),
property_set_enum().

Found by inspection, no actual crashes observed.

Fix them up.

Cc: Anthony Liguori <anthony@codemonkey.ws>
Cc: Hu Tao <hutao@cn.fujitsu.com>
Cc: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Andreas Färber <afaerber@suse.de>
2015-09-19 08:10:11 +02:00
..
container.c Make all static TypeInfos const 2013-01-10 15:11:53 -06:00
cpu.c cpu: Add crash_occurred flag into CPUState 2015-09-16 17:33:32 +02:00
Makefile.objs qom: allow QOM to be linked into tools binaries 2015-09-15 14:35:39 +01:00
object_interfaces.c qom: Add can_be_deleted callback to UserCreatableClass 2015-04-01 10:06:38 +02:00
object.c qom: Do not reuse errp after a possible error 2015-09-19 08:10:11 +02:00
qom-qobject.c qom: move include files to include/qom/ 2012-12-19 08:31:32 +01:00