projects
/
linux-2.6-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
673eed0
)
ipv6: remove redundant null pointer check before kfree_skb
author
zhong jiang
<zhongjiang@huawei.com>
Thu, 20 Sep 2018 09:37:46 +0000
(17:37 +0800)
committer
David S. Miller
<davem@davemloft.net>
Fri, 21 Sep 2018 16:04:37 +0000
(09:04 -0700)
kfree_skb has taken the null pointer into account. hence it is safe
to remove the redundant null pointer check before kfree_skb.
Signed-off-by: zhong jiang <zhongjiang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/af_inet6.c
patch
|
blob
|
blame
|
history
diff --git
a/net/ipv6/af_inet6.c
b/net/ipv6/af_inet6.c
index 77ef8478234f668b5c42a16c74062e9e98392dfb..e9c8cfdf4b4c7a64be9a68b81a304365a836d2c6 100644
(file)
--- a/
net/ipv6/af_inet6.c
+++ b/
net/ipv6/af_inet6.c
@@
-468,12
+468,10
@@
void inet6_destroy_sock(struct sock *sk)
/* Release rx options */
skb = xchg(&np->pktoptions, NULL);
- if (skb)
- kfree_skb(skb);
+ kfree_skb(skb);
skb = xchg(&np->rxpmtu, NULL);
- if (skb)
- kfree_skb(skb);
+ kfree_skb(skb);
/* Free flowlabels */
fl6_free_socklist(sk);