From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56880) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XwkzI-0008A7-NU for qemu-devel@nongnu.org; Thu, 04 Dec 2014 23:59:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XwkzC-000099-BS for qemu-devel@nongnu.org; Thu, 04 Dec 2014 23:59:28 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53825) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XwkzC-000095-2T for qemu-devel@nongnu.org; Thu, 04 Dec 2014 23:59:22 -0500 Message-ID: <54813BA4.5040404@redhat.com> Date: Thu, 04 Dec 2014 21:59:16 -0700 From: Eric Blake MIME-Version: 1.0 References: <1417750270-14056-1-git-send-email-arei.gonglei@huawei.com> In-Reply-To: <1417750270-14056-1-git-send-email-arei.gonglei@huawei.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="da1pWGmAhX7isF8lNAEIcCjVTXJvWEmtC" Subject: Re: [Qemu-devel] [PATCH] spice: fix memory leak List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: arei.gonglei@huawei.com, qemu-devel@nongnu.org Cc: pbonzini@redhat.com, weidong.huang@huawei.com, kraxel@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --da1pWGmAhX7isF8lNAEIcCjVTXJvWEmtC Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 12/04/2014 08:31 PM, arei.gonglei@huawei.com wrote: > From: Gonglei >=20 > If errors happen for middle items of channel_list, > qmp_query_spice_channels() return NULL, and varriable s/return/returns/ s/varriable/the variable/ > cur_item going out of scope leaks the storage it points to. > Let's check for errors in advance avoid memory leak. s/avoid/to avoid a/ >=20 > Suggested-by: Paolo Bonzini > Signed-off-by: Gonglei > --- > ui/spice-core.c | 12 +++++++----- > 1 file changed, 7 insertions(+), 5 deletions(-) >=20 Maintainer can fix up commit message typos. Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --da1pWGmAhX7isF8lNAEIcCjVTXJvWEmtC 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 iQEcBAEBCAAGBQJUgTukAAoJEKeha0olJ0NqsWIH/R6wuqhCqb0cpqq5PKWNuo1z iQYrQjkjeAGsbhXQSP752eOdG11MCyEBrOqzjrSpU8ld2Qkv7i6zK6/xyQe7DNTQ EIVV1tvis19dsVbhbxNYh8ALbOlsW2pnfweiwG/DvisrvruViRwDxFHEG1c2Z4J1 ExTnvb9Qpv+2OiuG+DO43J08IkHUlZMaRhaTjl9qQc2XnrD+BAvgPibcc2U3zxVJ YezgTmS6M0uSsuDabl7hCz0jpVHY0HI/Di0EEwO9YZFpz3D4gGHflZEIjMPruNup zYCUUR9my1QAtysxcJdzNKZ4fr/t+Rwd8JPHx6Rjc9eHe+fIqA0yOaGadZSWIIw= =bv1M -----END PGP SIGNATURE----- --da1pWGmAhX7isF8lNAEIcCjVTXJvWEmtC--