From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51631) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAKUJ-0006SS-12 for qemu-devel@nongnu.org; Wed, 01 Jul 2015 12:03:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZAKUF-0000Ch-Dw for qemu-devel@nongnu.org; Wed, 01 Jul 2015 12:03:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55428) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAKUF-0000CM-8r for qemu-devel@nongnu.org; Wed, 01 Jul 2015 12:03:47 -0400 Date: Wed, 1 Jul 2015 17:03:42 +0100 From: "Daniel P. Berrange" Message-ID: <20150701160342.GA19996@redhat.com> References: <1435765624-18404-1-git-send-email-armbru@redhat.com> <1435765624-18404-2-git-send-email-armbru@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1435765624-18404-2-git-send-email-armbru@redhat.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH for-2.4 1/2] qom: Do not reuse errp after a possible error Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: Hu@pond.sub.org, Anthony Liguori , qemu-devel@nongnu.org, Andreas =?utf-8?Q?F=C3=A4rber?= 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. >=20 > Instead of >=20 > foo(foos, errp); > bar(bars, errp); >=20 > you need to do something like >=20 > Error *err =3D NULL; >=20 > foo(foos, &err); > if (err) { > error_propagate(errp, err); > goto out; > } >=20 > bar(bars, errp); > out: >=20 > Screwed up in commit 0e55884 (v1.3.0): property_get_bool(). >=20 > Screwed up in commit 1f21772 (v2.1.0): object_property_get_enum() and > object_property_get_uint16List(). >=20 > Screwed up in commit a8e3fbe (not yet released): property_get_enum(), > property_set_enum(). >=20 > Found by inspection, no actual crashes observed. >=20 > Fix them up. >=20 > Cc: Andreas F=C3=A4rber > Cc: Anthony Liguori > Cc: Hu Tao Cc: Daniel P. Berrange > Signed-off-by: Markus Armbruster Looks good to me. Reviewed-by: Daniel P. Berrange Regards, Daniel --=20 |: http://berrange.com -o- http://www.flickr.com/photos/dberrange= / :| |: http://libvirt.org -o- http://virt-manager.or= g :| |: http://autobuild.org -o- http://search.cpan.org/~danberr= / :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vn= c :|