Patchwork [3/5] netfilter: nfnetlink_queue: remove pointless conditional before kfree_skb()

login
register
mail settings
Submitter Pablo Neira
Date Sept. 13, 2012, 11:01 a.m.
Message ID <1347534092-3579-4-git-send-email-pablo@netfilter.org>
Download mbox | patch
Permalink /patch/183612/
State Accepted
Headers show

Comments

Pablo Neira - Sept. 13, 2012, 11:01 a.m.
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

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 |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Patch

diff --git a/net/netfilter/nfnetlink_queue_core.c b/net/netfilter/nfnetlink_queue_core.c
index c0496a5..5c2d78d 100644
--- a/net/netfilter/nfnetlink_queue_core.c
+++ b/net/netfilter/nfnetlink_queue_core.c
@@ -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;
 }