Received: from eggs.gnu.org ([2001:4830:134:3::10]:35586) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCVlf-0002Kf-OU for qemu-devel@nongnu.org; Wed, 30 Jul 2014 11:26:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XCVlZ-0004kT-JU for qemu-devel@nongnu.org; Wed, 30 Jul 2014 11:26:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55550) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCVlZ-0004kF-AW for qemu-devel@nongnu.org; Wed, 30 Jul 2014 11:26:09 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s6UFQ8Nj009803 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 30 Jul 2014 11:26:08 -0400 Date: Wed, 30 Jul 2014 16:26:07 +0100 From: Stefan Hajnoczi Message-ID: <20140730152607.GK597@stefanha-thinkpad.redhat.com> References: <1406676538-23149-1-git-send-email-jsnow@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="zPXeIxDajdrcF2en" Content-Disposition: inline In-Reply-To: <1406676538-23149-1-git-send-email-jsnow@redhat.com> Subject: Re: [Qemu-devel] [PATCH 0/2] virtio-rng: Fix memory leaks in virtio_rng_device_realize List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: John Snow Cc: amit.shah@redhat.com, lcapitulino@redhat.com, qemu-devel@nongnu.org, armbru@redhat.com --zPXeIxDajdrcF2en Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 29, 2014 at 07:28:56PM -0400, John Snow wrote: > My previous commit, 713e8a10, did not address the fact that > the error checking pathways do not attempt to call > virtio_cleanup and thus can leak memory in hotplug scenarios. >=20 > This patchset shuffles around the error checking so it does not > need to perform said cleanup, and changes the error functions > from error_set to error_setg. >=20 > John Snow (2): > virtio-rng: Move error-checking forward to prevent memory leak > virtio-rng: replace error_set calls with error_setg >=20 > hw/virtio/virtio-rng.c | 25 ++++++++++++------------- > 1 file changed, 12 insertions(+), 13 deletions(-) Reviewed-by: Stefan Hajnoczi --zPXeIxDajdrcF2en Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJT2Q6PAAoJEJykq7OBq3PI+6YH/3LR5kLHJBQlRIT9gh1b0iPw QS5kzad99JtAPt1pagUDx8hzLc0EZ9JmMaZFxA2WvZisaD9MQBRWrQP0vBXYTieq lJLFbD19KfUyR4B6aiGBYfNO/HTTy82AEvJribJpM1W5h/sRdqF8D/pyXwjyak/D QalzoKlZJOqEW8iCgmzL7eU9eeyd15RwUYlHsgk8X6GWbGF5x/gc3WhDiEfzpfmq QHet/wqdjXAIBZcCBNWHbnDE01SgfipgCfiZNPPVWNszSGmXYVEjlMMWfzc9Ejze SgkfDolngtP+vig/lJ8HL6KBXtrFn/M7F6E9JhikwIHQE3HbgM1+MLySnLvQrWA= =NlQa -----END PGP SIGNATURE----- --zPXeIxDajdrcF2en--