From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47719) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XkFz2-0007Jv-Tc for qemu-devel@nongnu.org; Fri, 31 Oct 2014 13:27:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XkFyy-000863-Dx for qemu-devel@nongnu.org; Fri, 31 Oct 2014 13:27:32 -0400 From: Paolo Bonzini Date: Fri, 31 Oct 2014 18:26:11 +0100 Message-Id: <1414776373-9704-34-git-send-email-pbonzini@redhat.com> In-Reply-To: <1414776373-9704-1-git-send-email-pbonzini@redhat.com> References: <1414776373-9704-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL 33/35] ivshmem: Fix fd leak on error List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Andreas=20F=C3=A4rber?= , qemu-stable@nongnu.org From: Andreas F=C3=A4rber Reported-by: Stefan Hajnoczi Cc: qemu-stable@nongnu.org Signed-off-by: Andreas F=C3=A4rber Reviewed-by: Michael S. Tsirkin Signed-off-by: Paolo Bonzini --- hw/misc/ivshmem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index ecef82a..bf585b7 100644 --- a/hw/misc/ivshmem.c +++ b/hw/misc/ivshmem.c @@ -512,6 +512,7 @@ static void ivshmem_read(void *opaque, const uint8_t = *buf, int size) if (incoming_fd =3D=3D -1) { fprintf(stderr, "could not allocate file descriptor %s\n", strerror(err= no)); + close(tmp_fd); return; } =20 --=20 1.8.3.1