vhost_net: add a missing error return

We accidentally left out this error return so it leads to some use after
free bugs later on.

Fixes: 0a0be13b8f ("vhost_net: batch submitting XDP buffers to underlayer sockets")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Dan Carpenter 2018-09-20 13:01:59 +03:00 committed by David S. Miller
parent 1ba2a720da
commit 8a1aff144d
1 changed files with 1 additions and 0 deletions

View File

@ -1244,6 +1244,7 @@ static int vhost_net_open(struct inode *inode, struct file *f)
kfree(vqs);
kvfree(n);
kfree(queue);
return -ENOMEM;
}
n->vqs[VHOST_NET_VQ_TX].xdp = xdp;