Patchwork netfilter: remove redundant skb check in nf_conntrack_put_reasm

login
register
mail settings
Submitter Pablo Neira
Date June 20, 2013, 9:49 a.m.
Message ID <20130620094941.GA23325@localhost>
Download mbox | patch
Permalink /patch/252839/
State Not Applicable
Headers show

Comments

Pablo Neira - June 20, 2013, 9:49 a.m.
On Wed, Jun 19, 2013 at 10:27:35AM -0400, Phil Oester wrote:
> kfree_skb already checks for skb existence - remove redundant check from
> nf_conntrack_put_reasm.

Applied with changes. I have added this chunk to this patch.

 static void nf_ct_frag6_expire(unsigned long data)

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

--- a/net/ipv6/netfilter/nf_conntrack_reasm.c
+++ b/net/ipv6/netfilter/nf_conntrack_reasm.c
@@ -154,8 +154,7 @@  static unsigned int nf_hashfn(struct
inet_frag_queue *q)
 
 static void nf_skb_free(struct sk_buff *skb)
 {
-       if (NFCT_FRAG6_CB(skb)->orig)
-               kfree_skb(NFCT_FRAG6_CB(skb)->orig);
+       kfree_skb(NFCT_FRAG6_CB(skb)->orig);
 }