qemu/contrib
Stefan Hajnoczi 6852c21db2 vhost-user-scsi: avoid unlink(NULL) with fd passing
Commit 747421e949 ("Implements Backend
Program conventions for vhost-user-scsi") introduced fd-passing support
as part of implementing the vhost-user backend program conventions.

When fd passing is used the UNIX domain socket path is NULL and we must
not call unlink(2).

The unlink(2) call is necessary when the listen socket, lsock, was
created successfully since that means the UNIX domain socket is visible
in the file system.

Fixes: Coverity CID 1488353
Fixes: 747421e949 ("Implements Backend Program conventions for vhost-user-scsi")
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20220516155701.1789638-1-stefanha@redhat.com>
Reviewed-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2022-05-16 16:48:35 -04:00
..
elf2dmp include/qemu: rename Windows context definitions to expose bitness 2022-04-22 13:36:04 +04:00
gitdm mailmap/gitdm: more fixes for bad tags and authors 2022-03-23 10:37:49 +00:00
ivshmem-client meson: build contrib/ executables after generated headers 2022-01-12 14:09:06 +01:00
ivshmem-server util: rename qemu_*block() socket functions 2022-05-03 15:53:20 +04:00
plugins contrib/plugins: add a drcov plugin 2022-02-09 12:08:42 +00:00
rdmacm-mux meson, configure: move RDMA options to meson 2022-04-28 08:52:20 +02:00
systemd contrib: add systemd unit files 2017-12-20 22:29:26 +01:00
vhost-user-blk contrib/vhost-user-blk: add missing GOptionEntry NULL terminator 2022-04-21 12:01:24 +02:00
vhost-user-gpu Replace qemu_real_host_page variables with inlined functions 2022-04-06 10:50:38 +02:00
vhost-user-input Fix build with 64 bits time_t 2021-05-14 10:26:18 -04:00
vhost-user-scsi vhost-user-scsi: avoid unlink(NULL) with fd passing 2022-05-16 16:48:35 -04:00