Message ID | 20210527011155.10097-4-xiyou.wangcong@gmail.com |
---|---|
State | New |
Headers | show |
Series | [bpf,v3,1/8] skmsg: improve udp_bpf_recvmsg() accuracy | expand |
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 15f5504adf5b..e31d67fd5183 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -1798,11 +1798,13 @@ int udp_read_sock(struct sock *sk, read_descriptor_t *desc, if (used <= 0) { if (!copied) copied = used; + kfree_skb(skb); break; } else if (used <= skb->len) { copied += used; } + kfree_skb(skb); if (!desc->count) break; }