vhost-user: delete net client if necessary
PATCH 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, so we need to cleanup them.
Signed-off-by linzhecheng <[email protected]>
net/vhost-user.c +1 -0
@@ -345,6 +345,7 @@ err: s->vhost_user =NULL ; } } +qemu_del_net_client (nc0);return -1 ; }
Signature · 1 line
2.12.2.windows.2
Quoted 10 lines · linzhecheng
As
qemu_new_net_clientcreate new ncs but error happens later, ncs will be left in globalnet_clientslist, so we need to cleanup them.Signed-off-by linzhecheng <[email protected]>net/vhost-user.c +0
-0
net/vhost-user.c err: · line 351
Quoted 7 lines
net/vhost-user.c +1
-0@@ -345,6 +345,7 @@ err: s->vhost_user =NULL ; } } +qemu_del_net_client (nc0);return -1 ; }
Can nc0 be NULL here?
And please try to use "Fixes:" tag to ease stable maintenance.
Thanks