[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 087/109] virtiofsd: use fuse_lowlevel_is_virtio() in fuse_sess
From: |
Dr. David Alan Gilbert (git) |
Subject: |
[PATCH v2 087/109] virtiofsd: use fuse_lowlevel_is_virtio() in fuse_session_destroy() |
Date: |
Tue, 21 Jan 2020 12:24:11 +0000 |
From: Stefan Hajnoczi <address@hidden>
vu_socket_path is NULL when --fd=FDNUM was used. Use
fuse_lowlevel_is_virtio() instead.
Signed-off-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Daniel P. Berrangé <address@hidden>
---
tools/virtiofsd/fuse_lowlevel.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/tools/virtiofsd/fuse_lowlevel.c b/tools/virtiofsd/fuse_lowlevel.c
index 6e8c30fd9b..fe332bcb90 100644
--- a/tools/virtiofsd/fuse_lowlevel.c
+++ b/tools/virtiofsd/fuse_lowlevel.c
@@ -2541,12 +2541,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);
}
--
2.24.1
- [PATCH v2 078/109] virtiofsd: fix error handling in main(), (continued)
- [PATCH v2 078/109] virtiofsd: fix error handling in main(), Dr. David Alan Gilbert (git), 2020/01/21
- [PATCH v2 079/109] virtiofsd: cleanup allocated resource in se, Dr. David Alan Gilbert (git), 2020/01/21
- [PATCH v2 080/109] virtiofsd: fix memory leak on lo.source, Dr. David Alan Gilbert (git), 2020/01/21
- [PATCH v2 081/109] virtiofsd: add helper for lo_data cleanup, Dr. David Alan Gilbert (git), 2020/01/21
- [PATCH v2 082/109] virtiofsd: Prevent multiply running with same vhost_user_socket, Dr. David Alan Gilbert (git), 2020/01/21
- [PATCH v2 083/109] virtiofsd: enable PARALLEL_DIROPS during INIT, Dr. David Alan Gilbert (git), 2020/01/21
- [PATCH v2 084/109] virtiofsd: fix incorrect error handling in lo_do_lookup, Dr. David Alan Gilbert (git), 2020/01/21
- [PATCH v2 085/109] Virtiofsd: fix memory leak on fuse queueinfo, Dr. David Alan Gilbert (git), 2020/01/21
- [PATCH v2 086/109] virtiofsd: Support remote posix locks, Dr. David Alan Gilbert (git), 2020/01/21
- [PATCH v2 088/109] virtiofsd: prevent fv_queue_thread() vs virtio_loop() races, Dr. David Alan Gilbert (git), 2020/01/21
- [PATCH v2 087/109] virtiofsd: use fuse_lowlevel_is_virtio() in fuse_session_destroy(),
Dr. David Alan Gilbert (git) <=
- [PATCH v2 089/109] virtiofsd: make lo_release() atomic, Dr. David Alan Gilbert (git), 2020/01/21
- [PATCH v2 090/109] virtiofsd: prevent races with lo_dirp_put(), Dr. David Alan Gilbert (git), 2020/01/21
- [PATCH v2 091/109] virtiofsd: rename inode->refcount to inode->nlookup, Dr. David Alan Gilbert (git), 2020/01/21
- [PATCH v2 092/109] libvhost-user: Fix some memtable remap cases, Dr. David Alan Gilbert (git), 2020/01/21
- [PATCH v2 093/109] virtiofsd: add man page, Dr. David Alan Gilbert (git), 2020/01/21
- [PATCH v2 094/109] virtiofsd: passthrough_ll: fix refcounting on remove/rename, Dr. David Alan Gilbert (git), 2020/01/21
- [PATCH v2 095/109] virtiofsd: introduce inode refcount to prevent use-after-free, Dr. David Alan Gilbert (git), 2020/01/21
- [PATCH v2 096/109] virtiofsd: do not always set FUSE_FLOCK_LOCKS, Dr. David Alan Gilbert (git), 2020/01/21
- [PATCH v2 098/109] virtiofsd: Reset O_DIRECT flag during file open, Dr. David Alan Gilbert (git), 2020/01/21