From: Andreas Färber <[email protected]>
Reported-by: Stefan Hajnoczi <[email protected]>
Cc: [email protected]
Signed-off-by: Andreas Färber <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
(cherry picked from commit 3a31cff11203bf62ebafa6d74b1fcf2aba345eed)
Signed-off-by: Michael Roth <[email protected]>
---
hw/misc/ivshmem.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c
index c3dc5c3..7252f64 100644
--- a/hw/misc/ivshmem.c
+++ b/hw/misc/ivshmem.c
@@ -508,6 +508,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.9.1