diff options
author | Liu Bo <bo.liu@linux.alibaba.com> | 2019-06-07 05:43:52 +0800 |
---|---|---|
committer | Dr. David Alan Gilbert <dgilbert@redhat.com> | 2020-01-23 16:41:37 +0000 |
commit | 61cfc44982e566c33b9d5df17858e4d5ae373873 (patch) | |
tree | 10bda1ea80590986949c6a23dd782cb07f973566 /tools/virtiofsd/fuse_virtio.c | |
parent | c6de804670f2255ce776263124c37f3370dc5ac1 (diff) | |
download | qemu-61cfc44982e566c33b9d5df17858e4d5ae373873.zip qemu-61cfc44982e566c33b9d5df17858e4d5ae373873.tar.gz qemu-61cfc44982e566c33b9d5df17858e4d5ae373873.tar.bz2 |
virtiofsd: cleanup allocated resource in se
This cleans up unfreed resources in se on quiting, including
se->virtio_dev, se->vu_socket_path, se->vu_socketfd.
Signed-off-by: Liu Bo <bo.liu@linux.alibaba.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'tools/virtiofsd/fuse_virtio.c')
-rw-r--r-- | tools/virtiofsd/fuse_virtio.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/virtiofsd/fuse_virtio.c b/tools/virtiofsd/fuse_virtio.c index 7a8774a..e7bd772 100644 --- a/tools/virtiofsd/fuse_virtio.c +++ b/tools/virtiofsd/fuse_virtio.c @@ -833,3 +833,10 @@ int virtio_session_mount(struct fuse_session *se) return 0; } + +void virtio_session_close(struct fuse_session *se) +{ + close(se->vu_socketfd); + free(se->virtio_dev); + se->virtio_dev = NULL; +} |