Message ID | 1469762011-7902-30-git-send-email-mst@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c index 7b76591..4e6495e 100644 --- a/hw/net/vhost_net.c +++ b/hw/net/vhost_net.c @@ -417,6 +417,7 @@ VHostNetState *get_vhost_net(NetClientState *nc) break; case NET_CLIENT_DRIVER_VHOST_USER: vhost_net = vhost_user_get_vhost_net(nc); + assert(vhost_net); break; default: break; diff --git a/net/vhost-user.c b/net/vhost-user.c index d2a984d..39987a3 100644 --- a/net/vhost-user.c +++ b/net/vhost-user.c @@ -259,6 +259,8 @@ static int net_vhost_user_init(NetClientState *peer, const char *device, qemu_chr_add_handlers(chr, NULL, NULL, net_vhost_user_event, nc[0].name); + assert(s->vhost_net); + return 0; }