vhost-vsock: fix double close() in the realize() error path
commite82cdba3945340f524ba153170d52800dbd55ca4
authorStefano Garzarella <sgarzare@redhat.com>
Tue, 31 Mar 2020 07:59:10 +0000 (31 09:59 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 31 Mar 2020 14:54:28 +0000 (31 10:54 -0400)
tree64c0ef71524700c703047ae6972e9e6d46aad341
parent17e89077b7e3bc1d96540e21ddc7451c3e077049
vhost-vsock: fix double close() in the realize() error path

vhost_dev_cleanup() closes the vhostfd parameter passed to
vhost_dev_init(), so this patch avoids closing it twice in
the vhost_vsock_device_realize() error path.

Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Message-Id: <20200331075910.42529-1-sgarzare@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
hw/virtio/vhost-vsock.c