virtio/vhost-vsock: don't double close vhostfd, remove redundant cleanup
authorDaniil Tatianin <d-tatianin@yandex-team.ru>
Mon, 29 Nov 2021 12:52:04 +0000 (15:52 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Sat, 8 Jan 2022 00:30:13 +0000 (19:30 -0500)
commitd731ab31196579144457c7f2fa3649338bfb21f2
treea51ddb8a183977df6efb71076ccd5fc0fbb00716
parent539ba1acacb11a0f27a7e7ff7e2a7c1294e0a1ea
virtio/vhost-vsock: don't double close vhostfd, remove redundant cleanup

In case of an error during initialization in vhost_dev_init, vhostfd is
closed in vhost_dev_cleanup. Remove close from err_virtio as it's both
redundant and causes a double close on vhostfd.

Signed-off-by: Daniil Tatianin <d-tatianin@yandex-team.ru>
Message-Id: <20211129125204.1108088-1-d-tatianin@yandex-team.ru>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/virtio/vhost-vsock.c