aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2019-06-26 17:51:32 +0100
committerDr. David Alan Gilbert <dgilbert@redhat.com>2020-01-23 16:41:37 +0000
commit620e9d8d9cee6df7fe71168dea950dba0cc21a4a (patch)
tree0f70d6dab93bf034d9e1b849d439219163dbfe29 /tools
parent0e81414c54161296212f6bc8a1c70526c4a9755a (diff)
virtiofsd: use fuse_lowlevel_is_virtio() in fuse_session_destroy()
vu_socket_path is NULL when --fd=FDNUM was used. Use fuse_lowlevel_is_virtio() instead. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/virtiofsd/fuse_lowlevel.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/virtiofsd/fuse_lowlevel.c b/tools/virtiofsd/fuse_lowlevel.c
index 70568d22a4..dab6a31e08 100644
--- a/tools/virtiofsd/fuse_lowlevel.c
+++ b/tools/virtiofsd/fuse_lowlevel.c
@@ -2537,12 +2537,13 @@ void fuse_session_destroy(struct fuse_session *se)
close(se->fd);
}
- if (se->vu_socket_path) {
+ if (fuse_lowlevel_is_virtio(se)) {
virtio_session_close(se);
- free(se->vu_socket_path);
- se->vu_socket_path = NULL;
}
+ free(se->vu_socket_path);
+ se->vu_socket_path = NULL;
+
free(se);
}