Commit c67daf4a authored by linzhecheng's avatar linzhecheng Committed by Jason Wang
Browse files

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: default avatarlinzhecheng <linzhecheng@huawei.com>
Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
parent 2285a00c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -345,6 +345,9 @@ err:
            s->vhost_user = NULL;
        }
    }
    if (nc0) {
        qemu_del_net_client(nc0);
    }

    return -1;
}