diff options
author | Andreas Färber <afaerber@suse.de> | 2014-09-15 18:40:08 +0200 |
---|---|---|
committer | Michael Roth <mdroth@linux.vnet.ibm.com> | 2015-01-06 15:43:56 -0600 |
commit | c4379ce8efe091bdc0eb3789a2e4eb83d4a2f6ae (patch) | |
tree | a5695dc78b81254d980d486b6c8b21b6c97c7e33 /hw | |
parent | a95569d24f2462e1795a85aca17185ecd8856fc3 (diff) | |
download | qemu-c4379ce8efe091bdc0eb3789a2e4eb83d4a2f6ae.tar.gz |
ivshmem: Fix fd leak on error
Reported-by: Stefan Hajnoczi <stefanha@redhat.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit 3a31cff11203bf62ebafa6d74b1fcf2aba345eed)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/misc/ivshmem.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index c3dc5c3179..7252f6481d 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; } |