Skip to content

Commit

Permalink
netlink: remove some pointless conditionals before kfree_skb()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wei Yongjun authored and David S. Miller committed Feb 27, 2009
1 parent 40d4444 commit 91744f6
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions net/netlink/af_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit 91744f6

Please sign in to comment.