mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
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>
This commit is contained in:
parent
c6de804670
commit
61cfc44982
3 changed files with 15 additions and 1 deletions
|
@ -2532,6 +2532,13 @@ void fuse_session_destroy(struct fuse_session *se)
|
|||
if (se->fd != -1) {
|
||||
close(se->fd);
|
||||
}
|
||||
|
||||
if (se->vu_socket_path) {
|
||||
virtio_session_close(se);
|
||||
free(se->vu_socket_path);
|
||||
se->vu_socket_path = NULL;
|
||||
}
|
||||
|
||||
free(se);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue