mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-31 06:14:39 +01:00
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 <[email protected]>
Signed-off-by: Michal Luczaj <[email protected]>
Acked-by: Arseniy Krasnov <[email protected]>
Signed-off-by: Paolo Abeni <[email protected]>
This commit is contained in:
1 parent
fbf7085b3a
commit
60cf6206a1
1 file changed
+1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user