vhost-user: delete net client if necessary
PATCH v2 1/1 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.
Signed-off-by linzhecheng <[email protected]>
net/vhost-user.c +3 -0
@@ -345,6 +345,9 @@ err: s->vhost_user =NULL ; } } +if (nc0) { +qemu_del_net_client (nc0); + }return -1 ; }
Signature · 1 line
2.12.2.windows.2
Quoted 11 lines · linzhecheng
As
qemu_new_net_clientcreate new ncs but error happens later, ncs will be left in globalnet_clientslist and we can't use them any more, so we need to cleanup them.Signed-off-by linzhecheng <[email protected]>net/vhost-user.c +0
-0
net/vhost-user.c err: · line 353
Quoted 9 lines
net/vhost-user.c +3
-0@@ -345,6 +345,9 @@ err: s->vhost_user =NULL ; } } +if (nc0) { +qemu_del_net_client (nc0); + }return -1 ; }
Applied and queued for -stable.
Please cc stable next time.
Btw, do we have similar issues for tap?
Thanks