g_free() was moved from vhost_net_cleanup in commit
e6bcb1b, so we should
free net after vhost_net_cleanup
Signed-off-by: linzhecheng <linzhecheng@huawei.com>
Reviewed-by: Marc-André Lureau < marcandre.lureau@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
err:
if (net) {
vhost_net_cleanup(net);
+ g_free(net);
}
vhost_user_stop(i, ncs);
return -1;