提交 a38a498d 编写于 作者: L linzhecheng 提交者: Michael S. Tsirkin

vhost-user: fix memory leak

g_free() was moved from vhost_net_cleanup in commit e6bcb1b6, so we should
free net after vhost_net_cleanup
Signed-off-by: Nlinzhecheng <linzhecheng@huawei.com>
Reviewed-by: Marc-André Lureau < marcandre.lureau@redhat.com>
Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
上级 8cb340c6
......@@ -109,6 +109,7 @@ static int vhost_user_start(int queues, NetClientState *ncs[], CharBackend *be)
err:
if (net) {
vhost_net_cleanup(net);
g_free(net);
}
vhost_user_stop(i, ncs);
return -1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册