mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
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>
This commit is contained in:
parent
34bc07c528
commit
3a31cff112
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue