From: Marc Fiuczynski Date: Tue, 30 Nov 2004 15:59:12 +0000 (+0000) Subject: PL3069 X-Git-Tag: before-enable-kexec-patch~4 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=039005bddc2bb0e765f96652c65eef3b7d34aea2;p=linux-2.6.git PL3069 Fixed memory leak of skbuff. Requires changes to accurately do statistics and some additional cosmetic changes. But this should be sufficient for the next release candidate. --- diff --git a/include/net/sock.h b/include/net/sock.h index 0d3da11ec..1f1a1edc4 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -1086,8 +1086,11 @@ static inline int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) * packet. */ if (inet_stream_ops.bind != inet_bind && - (int) sk->sk_xid > 0 && sk->sk_xid != skb->xid) + (int) sk->sk_xid > 0 && sk->sk_xid != skb->xid) { + err = 0; /* ensures that it is silent */ + kfree_skb(skb); /* discard frame */ goto out; + } /* Cast skb->rcvbuf to unsigned... It's pointless, but reduces number of warnings when compiling with -W --ANK