Skip to content

Commit 60cf620

Browse files
mmhalPaolo Abeni
authored andcommitted
virtio/vsock: Improve MSG_ZEROCOPY error handling
Add a missing kfree_skb() to prevent memory leaks. Fixes: 581512a ("vsock/virtio: MSG_ZEROCOPY flag support") Reviewed-by: Stefano Garzarella <[email protected]> Signed-off-by: Michal Luczaj <[email protected]> Acked-by: Arseniy Krasnov <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
1 parent fbf7085 commit 60cf620

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/vmw_vsock/virtio_transport_common.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,7 @@ static int virtio_transport_send_pkt_info(struct vsock_sock *vsk,
400400
if (virtio_transport_init_zcopy_skb(vsk, skb,
401401
info->msg,
402402
can_zcopy)) {
403+
kfree_skb(skb);
403404
ret = -ENOMEM;
404405
break;
405406
}

0 commit comments

Comments
 (0)