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:
parent
1ba2a720da
commit
8a1aff144d
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue