diff options
author | Wei Yongjun <yjwei@cn.fujitsu.com> | 2009-02-24 19:34:41 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-27 02:07:34 -0500 |
commit | 91744f6559393697e13bf0f9f3f35f884e2520f9 (patch) | |
tree | b0f1d8a2145bc5a59147ae9e5660985f389657aa /net/netlink | |
parent | 40d44446cf10d9d118e8f0132c94e1f25ea3be97 (diff) |
netlink: 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/netlink')
-rw-r--r-- | net/netlink/af_netlink.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index 2760b62dc2c1..e57d700bf6d9 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c | |||
@@ -1049,8 +1049,7 @@ int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, u32 pid, | |||
1049 | 1049 | ||
1050 | netlink_unlock_table(); | 1050 | netlink_unlock_table(); |
1051 | 1051 | ||
1052 | if (info.skb2) | 1052 | kfree_skb(info.skb2); |
1053 | kfree_skb(info.skb2); | ||
1054 | 1053 | ||
1055 | if (info.delivery_failure) | 1054 | if (info.delivery_failure) |
1056 | return -ENOBUFS; | 1055 | return -ENOBUFS; |
@@ -1542,8 +1541,7 @@ EXPORT_SYMBOL(netlink_set_nonroot); | |||
1542 | 1541 | ||
1543 | static void netlink_destroy_callback(struct netlink_callback *cb) | 1542 | static void netlink_destroy_callback(struct netlink_callback *cb) |
1544 | { | 1543 | { |
1545 | if (cb->skb) | 1544 | kfree_skb(cb->skb); |
1546 | kfree_skb(cb->skb); | ||
1547 | kfree(cb); | 1545 | kfree(cb); |
1548 | } | 1546 | } |
1549 | 1547 | ||