From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36104) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1nSt-0006OT-9M for qemu-devel@nongnu.org; Wed, 25 Nov 2015 22:43:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a1nSq-0002Oe-2U for qemu-devel@nongnu.org; Wed, 25 Nov 2015 22:43:23 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45640) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1nSp-0002OV-Su for qemu-devel@nongnu.org; Wed, 25 Nov 2015 22:43:19 -0500 References: <1448501448-5652-1-git-send-email-opensource.dxs@aliyun.com> From: Eric Blake Message-ID: <56567FD0.2040105@redhat.com> Date: Wed, 25 Nov 2015 20:43:12 -0700 MIME-Version: 1.0 In-Reply-To: <1448501448-5652-1-git-send-email-opensource.dxs@aliyun.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="TUegcfcLhslrCQFluU99fm2a0g0hEb3Gk" Subject: Re: [Qemu-devel] [PATCH for-2.5] Avoid memory leak List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: dongxingshui , armbru@redhat.com Cc: zhongguocheng@huawei.com, dongxingshui@huawei.com, qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --TUegcfcLhslrCQFluU99fm2a0g0hEb3Gk Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 11/25/2015 06:30 PM, dongxingshui wrote: > monitor.c: Avoid memory leak >=20 > When send a wrong qmp command, a memory leak occurs. Fix it. Looks like the leak was introduced in 710aec9; would be worth amending the commit message to mention that. Reviewed-by: Eric Blake >=20 > Signed-off-by: dongxingshui This looks like your first patch to qemu (at least I wasn't able to find anything from you via 'git log') - welcome to the community. I suspect that 'dongxingshui' is probably your login name; it doesn't give a Western reader like me an idea where to break into family and personal names. It's a bit nicer to use a 'Full Name' notation, or even to list your name in two forms (Latin and native UTF-8 characters); see this recent conversation: https://lists.gnu.org/archive/html/qemu-devel/2015-11/msg05208.html > --- > monitor.c | 1 + > 1 file changed, 1 insertion(+) >=20 > diff --git a/monitor.c b/monitor.c > index e4cf34e..af6cfc5 100644 > --- a/monitor.c > +++ b/monitor.c > @@ -3906,6 +3906,7 @@ static void handle_qmp_command(JSONMessageParser = *parser, QList *tokens) > =20 > err_out: > monitor_protocol_emitter(mon, data, local_err); > + error_free(local_err); > qobject_decref(data); > QDECREF(input); > QDECREF(args); >=20 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --TUegcfcLhslrCQFluU99fm2a0g0hEb3Gk 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/ iQEcBAEBCAAGBQJWVn/QAAoJEKeha0olJ0NqJx0H/0Ow6J2ePqPkcLLYBUliMyE1 JVpAo8bAYBPiU9MlWSaNkfCWKv5Dr998O+AKrqe86mEDrIJktgAesEq4Dhxeucwb 3Z/GQrZsnInGEALJiFg+rMzpcpyQ9uI4e9gjBSwQzHdncGQsCRFE7wecCFyPba6A xlUdjPmsnRcwcl1yv7oTkE8k2EIeYdUh27N9BEdPa96HktsL2h+iNgEPIpjL2O6h PdUHZ1GE4gZbICjwCmeKrVehe7iT8wp5MyTHE5NPG16fLcLiNGEqZ+ObhFXhFf9B askq7sr51FtKzdmdVqjtm07FntMousHLnNQvUKvWNQ6GCNfXylhKh7IK99z8Akk= =kJQ2 -----END PGP SIGNATURE----- --TUegcfcLhslrCQFluU99fm2a0g0hEb3Gk--