mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
ipv6: remove redundant null pointer check before kfree_skb
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> Signed-off-by: Jesse Chan <jc@linux.com> Signed-off-by: azrim <mirzaspc@gmail.com>
This commit is contained in:
parent
eb686bd100
commit
80f86573cb
@ -459,12 +459,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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user