mirror of
https://github.com/qemu/qemu.git
synced 2024-11-27 22:03:35 +08:00
vhost-user: delete net client if necessary
As qemu_new_net_client create new ncs but error happens later, ncs will be left in global net_clients list and we can't use them any more, so we need to cleanup them. Cc: qemu-stable@nongnu.org Signed-off-by: linzhecheng <linzhecheng@huawei.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
This commit is contained in:
parent
2285a00c11
commit
c67daf4a24
@ -345,6 +345,9 @@ err:
|
||||
s->vhost_user = NULL;
|
||||
}
|
||||
}
|
||||
if (nc0) {
|
||||
qemu_del_net_client(nc0);
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user