From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38666) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKr77-0002qH-Mt for qemu-devel@nongnu.org; Tue, 04 Mar 2014 10:18:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WKr71-0006fL-Sb for qemu-devel@nongnu.org; Tue, 04 Mar 2014 10:18:37 -0500 Received: from mx1.redhat.com ([209.132.183.28]:25960) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKr71-0006f8-Ic for qemu-devel@nongnu.org; Tue, 04 Mar 2014 10:18:31 -0500 Message-ID: <5315EEC4.1010209@redhat.com> Date: Tue, 04 Mar 2014 08:18:28 -0700 From: Eric Blake MIME-Version: 1.0 References: <1393943298-5938-1-git-send-email-stefanha@redhat.com> In-Reply-To: <1393943298-5938-1-git-send-email-stefanha@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ueQ4qcPS9X3VBw30APbbN6iPunljpBPuk" Subject: Re: [Qemu-devel] [PATCH] qom: avoid leaking str and bool properties on failure List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi , qemu-devel@nongnu.org Cc: Andreas Faerber This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --ueQ4qcPS9X3VBw30APbbN6iPunljpBPuk Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 03/04/2014 07:28 AM, Stefan Hajnoczi wrote: > When object_property_add_str() and object_property_add_bool() fail, the= y > leak their internal StringProperty and BoolProperty structs. Remember > to free the structs on error. >=20 > Luckily this is a low-impact memory leak since most QOM properties are > static qdev properties that will never take the error case. > object_property_add() only fails if the property name is already in use= =2E >=20 > Signed-off-by: Stefan Hajnoczi > --- > qom/object.c | 14 ++++++++++++-- > 1 file changed, 12 insertions(+), 2 deletions(-) Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --ueQ4qcPS9X3VBw30APbbN6iPunljpBPuk Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJTFe7EAAoJEKeha0olJ0Nq9MAH/3Vn1xDZeU0tCVUDBTLS1GTU b4RaYZfZGp+tPDX+SkZ9UVEt9IyRd641syCIx1W5wzRJ3PnKK2Nd2C4iR0/JLs+b Bz6+Y+sAM6DU2XjdGJz/SCWuSKE+e3G+u44QVA1JbT7gG3vuytmh1A3NM08aTNAP xFfoa+2bWTK7jBWj07bnsYXsUHmvhmT1HxLyo88nGpd6hkfOE6vHJn6O2R0lExkf 6+ru/Z9SuYLslPDQINS5ZjDMWwrKXbCiO3J2lCYtXf7ZPHnHTGCP3pQliUaPq+dq IEgCW3zJ4GZBDZrfP4RfIv9MTKW6u1Ef40KuglEaolN7ZAY4qt8tE9TjR99HF94= =hQrh -----END PGP SIGNATURE----- --ueQ4qcPS9X3VBw30APbbN6iPunljpBPuk--