提交 6f961068 编写于 作者: W Wei Yongjun 提交者: David S. Miller

af_key: remove some pointless conditionals before kfree_skb()

Remove some pointless conditionals before kfree_skb().
Signed-off-by: NWei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 fbbfb986
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册