From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54290) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCGph-0005Gf-BP for qemu-devel@nongnu.org; Tue, 29 Jul 2014 19:29:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XCGpb-0006Iz-7K for qemu-devel@nongnu.org; Tue, 29 Jul 2014 19:29:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55631) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCGpa-0006It-Vx for qemu-devel@nongnu.org; Tue, 29 Jul 2014 19:29:19 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s6TNTH7N006155 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 29 Jul 2014 19:29:17 -0400 From: John Snow Date: Tue, 29 Jul 2014 19:28:56 -0400 Message-Id: <1406676538-23149-1-git-send-email-jsnow@redhat.com> Subject: [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: qemu-devel@nongnu.org Cc: amit.shah@redhat.com, jsnow@redhat.com, armbru@redhat.com, stefanha@redhat.com, lcapitulino@redhat.com 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(-) -- 1.9.3