OSDN Git Service
(root)
/
qmiga
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
34bc07c
)
ivshmem: Fix fd leak on error
author
Andreas Färber
<afaerber@suse.de>
Mon, 15 Sep 2014 16:40:08 +0000
(18:40 +0200)
committer
Paolo Bonzini
<pbonzini@redhat.com>
Fri, 31 Oct 2014 16:02:14 +0000
(17:02 +0100)
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>
hw/misc/ivshmem.c
patch
|
blob
|
history
diff --git
a/hw/misc/ivshmem.c
b/hw/misc/ivshmem.c
index
ecef82a
..
bf585b7
100644
(file)
--- 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;
}