[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-stable] [PATCH v3 4/4] ivshmem: Fix fd leak on error
From: |
Andreas Färber |
Subject: |
[Qemu-stable] [PATCH v3 4/4] ivshmem: Fix fd leak on error |
Date: |
Mon, 15 Sep 2014 18:40:08 +0200 |
Reported-by: Stefan Hajnoczi <address@hidden>
Cc: address@hidden
Signed-off-by: Andreas Färber <address@hidden>
---
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 == -1) {
fprintf(stderr, "could not allocate file descriptor %s\n",
strerror(errno));
+ close(tmp_fd);
return;
}
--
1.8.4.5
- [Qemu-stable] [PATCH v3 4/4] ivshmem: Fix fd leak on error,
Andreas Färber <=