hw/9pfs: Fix potential memory leak and avoid reuse of freed memory
The leak was reported by cppcheck. Function proxy_init also calls g_free for ctx->fs_root. Avoid reuse of this memory by setting ctx->fs_root to NULL. Signed-off-by: NStefan Weil <sw@weilnetz.de> Reviewed-by: NM. Mohan Kumar <mohan@in.ibm.com> Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
Showing
想要评论请 注册 或 登录