virtio/vsock: Improve MSG_ZEROCOPY error handling
Add a missing kfree_skb() to prevent memory leaks.
Fixes: 581512a6dc
("vsock/virtio: MSG_ZEROCOPY flag support")
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Michal Luczaj <mhal@rbox.co>
Acked-by: Arseniy Krasnov <avkrasnov@salutedevices.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
parent
fbf7085b3a
commit
60cf6206a1
@ -400,6 +400,7 @@ static int virtio_transport_send_pkt_info(struct vsock_sock *vsk,
|
||||
if (virtio_transport_init_zcopy_skb(vsk, skb,
|
||||
info->msg,
|
||||
can_zcopy)) {
|
||||
kfree_skb(skb);
|
||||
ret = -ENOMEM;
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user