Received: from eggs.gnu.org ([2001:4830:134:3::10]:46835) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCMtD-0004bZ-0f for qemu-devel@nongnu.org; Wed, 30 Jul 2014 01:57:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XCMt6-0000e3-SI for qemu-devel@nongnu.org; Wed, 30 Jul 2014 01:57:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1732) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCMt6-0000dE-Kv for qemu-devel@nongnu.org; Wed, 30 Jul 2014 01:57:20 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s6U5vJ61010255 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 30 Jul 2014 01:57:19 -0400 From: Markus Armbruster References: <1406676538-23149-1-git-send-email-jsnow@redhat.com> Date: Wed, 30 Jul 2014 07:57:16 +0200 In-Reply-To: <1406676538-23149-1-git-send-email-jsnow@redhat.com> (John Snow's message of "Tue, 29 Jul 2014 19:28:56 -0400") Message-ID: <87fvhjz8w3.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain 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, qemu-devel@nongnu.org, stefanha@redhat.com, lcapitulino@redhat.com John Snow writes: > 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. > > 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. > > John Snow (2): > virtio-rng: Move error-checking forward to prevent memory leak > virtio-rng: replace error_set calls with error_setg > > hw/virtio/virtio-rng.c | 25 ++++++++++++------------- > 1 file changed, 12 insertions(+), 13 deletions(-) Reviewed-by: Markus Armbruster