[Virtio-fs] [PATCH 3/5] virtiofsd: fix memory leak on lo.inodes hashmap
Liu Bo
bo.liu at linux.alibaba.com
Wed Jun 5 00:42:34 UTC 2019
lo.inodes hashmap was not unref/destroy 'd on quiting, which was caught by valgrind.
Signed-off-by: Liu Bo <bo.liu at linux.alibaba.com>
---
contrib/virtiofsd/passthrough_ll.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/contrib/virtiofsd/passthrough_ll.c b/contrib/virtiofsd/passthrough_ll.c
index f348b16..e7e19dc 100644
--- a/contrib/virtiofsd/passthrough_ll.c
+++ b/contrib/virtiofsd/passthrough_ll.c
@@ -2324,6 +2324,8 @@ err_out2:
err_out1:
fuse_opt_free_args(&args);
+ if (lo.inodes)
+ g_hash_table_destroy(lo.inodes);
lo_map_destroy(&lo.fd_map);
lo_map_destroy(&lo.dirp_map);
lo_map_destroy(&lo.ino_map);
--
1.8.3.1
More information about the Virtio-fs
mailing list