From: Li Qiang <liqiang...@360.cn>

When the 9pfs use 'handle'/'proxy' as the backend driver it
will allocate a private data memory. But this memory is not freed in
the unrealize function thus leading a memory leak issue. This patch
avoid this.

Signed-off-by: Li Qiang <liqiang...@360.cn>
---
 hw/9pfs/9p.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c
index aea7e9d..6524b13 100644
--- a/hw/9pfs/9p.c
+++ b/hw/9pfs/9p.c
@@ -3532,6 +3532,7 @@ void v9fs_device_unrealize_common(V9fsState *s, Error 
**errp)
 {
     g_free(s->ctx.fs_root);
     g_free(s->tag);
+    g_free(s->ctx.private);
 }
 
 typedef struct VirtfsCoResetData {
-- 
1.8.3.1


Reply via email to