diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 1307ad0d3b9edcda49e59cbc6201e1024f2ceb41..8091276cb85b8070a23a63cdfd30a67115173270 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; }