From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56158) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKtH8-0007gs-CY for qemu-devel@nongnu.org; Wed, 06 Jul 2016 16:18:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bKtH4-0002jk-LK for qemu-devel@nongnu.org; Wed, 06 Jul 2016 16:18:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44481) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKtH4-0002jg-Fg for qemu-devel@nongnu.org; Wed, 06 Jul 2016 16:18:22 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1F68FC0624A4 for ; Wed, 6 Jul 2016 20:18:22 +0000 (UTC) References: <20160706164246.22116-1-marcandre.lureau@redhat.com> From: Eric Blake Message-ID: <577D6788.4050200@redhat.com> Date: Wed, 6 Jul 2016 14:18:16 -0600 MIME-Version: 1.0 In-Reply-To: <20160706164246.22116-1-marcandre.lureau@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="LnFqGW2rrQ8M89tFEEeLfagmjHJHUoKNB" Subject: Re: [Qemu-devel] [PATCH] qemu-sockets: use qapi_free_SocketAddress in cleanup List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: marcandre.lureau@redhat.com, qemu-devel@nongnu.org Cc: pbonzini@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --LnFqGW2rrQ8M89tFEEeLfagmjHJHUoKNB From: Eric Blake To: marcandre.lureau@redhat.com, qemu-devel@nongnu.org Cc: pbonzini@redhat.com Message-ID: <577D6788.4050200@redhat.com> Subject: Re: [Qemu-devel] [PATCH] qemu-sockets: use qapi_free_SocketAddress in cleanup References: <20160706164246.22116-1-marcandre.lureau@redhat.com> In-Reply-To: <20160706164246.22116-1-marcandre.lureau@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 07/06/2016 10:42 AM, marcandre.lureau@redhat.com wrote: > From: Marc-Andr=C3=A9 Lureau >=20 > Commit 74b6ce43e3 uses the wrong free API for a SocketAddress, that > may leak some linked data. >=20 > Signed-off-by: Marc-Andr=C3=A9 Lureau > --- > util/qemu-sockets.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Eric Blake >=20 > diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c > index fb83d48..777af49 100644 > --- a/util/qemu-sockets.c > +++ b/util/qemu-sockets.c > @@ -1012,7 +1012,7 @@ void socket_listen_cleanup(int fd, Error **errp) > } > } > =20 > - g_free(addr); > + qapi_free_SocketAddress(addr); > } > =20 > int socket_dgram(SocketAddress *remote, SocketAddress *local, Error **= errp) >=20 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --LnFqGW2rrQ8M89tFEEeLfagmjHJHUoKNB Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJXfWeIAAoJEKeha0olJ0NqCJgH/RJsXBdcbLf1/B6gioDsgDQA /omIQrJe/NmD913OZkqAeLZNP5YIiteU4/9OqUWw5GSTTtF8MC9SUKoVHiLG/+1U 2L/DPeKFoc3TMY1koKRM4R+TyOMggaD/IogPOMxQr2PBm1DBgTsL+d57Kmociqoi wp2rkqY9MPk4H3REzRv9O1shLD8e1oYfGxUcTOfFJDHfIFJhteMxhhJGkshv/8iQ 8cW2M1ghwYqC7pQJk2b72i6i+RhgYb1POFetwBg8vMTLCzBEsaOA2QqwBMpyDdjZ NW+il92Iek16tje4a8WHqfkCjAY1s+JDXomWT3Clx3fSwteG3KwOGFlqvzahRNs= =x+w4 -----END PGP SIGNATURE----- --LnFqGW2rrQ8M89tFEEeLfagmjHJHUoKNB--