summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorWei Yongjun <yjwei@cn.fujitsu.com>2009-02-25 03:31:04 +0300
committerDavid S. Miller <davem@davemloft.net>2009-02-27 10:07:32 +0300
commit6f961068671698c242f1828960485fef1392916f (patch)
tree3a4a7119d026e3639496d44a50f5ff8692169e96 /net
parentfbbfb986a8a3dfb42cd4cae7b1c7f822792823af (diff)
downloadlinux-6f961068671698c242f1828960485fef1392916f.tar.xz
af_key: remove some pointless conditionals before kfree_skb()
Remove some pointless conditionals before kfree_skb(). Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/key/af_key.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/key/af_key.c b/net/key/af_key.c
index 7dcbde3ea7d9..643c1be2d02e 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -313,8 +313,7 @@ static int pfkey_broadcast(struct sk_buff *skb, gfp_t allocation,
if (one_sk != NULL)
err = pfkey_broadcast_one(skb, &skb2, allocation, one_sk);
- if (skb2)
- kfree_skb(skb2);
+ kfree_skb(skb2);
kfree_skb(skb);
return err;
}
@@ -3573,8 +3572,7 @@ static int pfkey_sendmsg(struct kiocb *kiocb,
out:
if (err && hdr && pfkey_error(hdr, err, sk) == 0)
err = 0;
- if (skb)
- kfree_skb(skb);
+ kfree_skb(skb);
return err ? : len;
}