On Wed, Jul 01, 2015 at 05:47:03PM +0200, Markus Armbruster wrote:
> 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 (not yet released): property_get_enum(),
> property_set_enum().
>
> Found by inspection, no actual crashes observed.
>
> Fix them up.
>
> Cc: Andreas Färber <[email protected]>
> Cc: Anthony Liguori <[email protected]>
> Cc: Hu Tao <[email protected]
> Cc: Daniel P. Berrange <[email protected]>
> Signed-off-by: Markus Armbruster <[email protected]>
Looks good to me.
Reviewed-by: Daniel P. Berrange <[email protected]>
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|