Commit 91744f65 authored by Wei Yongjun's avatar Wei Yongjun Committed by David S. Miller

netlink: remove some pointless conditionals before kfree_skb()

Remove some pointless conditionals before kfree_skb().
Signed-off-by: default avatarWei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 40d44446
......@@ -1049,8 +1049,7 @@ int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, u32 pid,
netlink_unlock_table();
if (info.skb2)
kfree_skb(info.skb2);
kfree_skb(info.skb2);
if (info.delivery_failure)
return -ENOBUFS;
......@@ -1542,8 +1541,7 @@ EXPORT_SYMBOL(netlink_set_nonroot);
static void netlink_destroy_callback(struct netlink_callback *cb)
{
if (cb->skb)
kfree_skb(cb->skb);
kfree_skb(cb->skb);
kfree(cb);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment