diff options
author | Michal Luczaj <mhal@rbox.co> | 2024-11-07 21:46:14 +0100 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2024-11-12 12:16:51 +0100 |
commit | 60cf6206a1f513512f5d73fa4d3dbbcad2e7dcd6 (patch) | |
tree | c3be172a2d9019f60d2bab0beff7b67e1e67be42 /net | |
parent | fbf7085b3ad1c7cc0677834c90f985f1b4f77a33 (diff) |
virtio/vsock: Improve MSG_ZEROCOPY error handling
Add a missing kfree_skb() to prevent memory leaks.
Fixes: 581512a6dc93 ("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>
Diffstat (limited to 'net')
-rw-r--r-- | net/vmw_vsock/virtio_transport_common.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c index cd075f608d4f..e2e6a30b759b 100644 --- a/net/vmw_vsock/virtio_transport_common.c +++ b/net/vmw_vsock/virtio_transport_common.c @@ -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; } |