netfilter: nfnetlink_queue: remove pointless conditional before kfree_skb()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Tue, 28 Aug 2012 03:14:15 +0000 (03:14 +0000)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sun, 9 Sep 2012 18:33:57 +0000 (20:33 +0200)
Remove pointless conditional before kfree_skb().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nfnetlink_queue_core.c

index c0496a55ad0ceffb5470872cadc83c218a4b70c9..5c2d78d3a4d829d819c95699e90cbc3fba894851 100644 (file)
@@ -406,8 +406,7 @@ nfqnl_build_packet_message(struct nfqnl_instance *queue,
        return skb;
 
 nla_put_failure:
-       if (skb)
-               kfree_skb(skb);
+       kfree_skb(skb);
        net_err_ratelimited("nf_queue: error creating packet message\n");
        return NULL;
 }