diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/virtiofsd/fuse_virtio.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/virtiofsd/fuse_virtio.c b/tools/virtiofsd/fuse_virtio.c index 80a6e929df..dd1c605dbf 100644 --- a/tools/virtiofsd/fuse_virtio.c +++ b/tools/virtiofsd/fuse_virtio.c @@ -916,6 +916,7 @@ static int fv_create_listen_socket(struct fuse_session *se) old_umask = umask(0077); if (bind(listen_sock, (struct sockaddr *)&un, addr_len) == -1) { fuse_log(FUSE_LOG_ERR, "vhost socket bind: %m\n"); + close(listen_sock); umask(old_umask); return -1; } @@ -923,6 +924,7 @@ static int fv_create_listen_socket(struct fuse_session *se) if (listen(listen_sock, 1) == -1) { fuse_log(FUSE_LOG_ERR, "vhost socket listen: %m\n"); + close(listen_sock); return -1; } |