mirror of
https://github.com/torvalds/linux.git
synced 2024-12-15 07:33:56 +00:00
crypto: chtls - 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: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
4d407b04d4
commit
ce1294d981
@ -234,8 +234,7 @@ static void chtls_send_reset(struct sock *sk, int mode, struct sk_buff *skb)
|
||||
|
||||
return;
|
||||
out:
|
||||
if (skb)
|
||||
kfree_skb(skb);
|
||||
kfree_skb(skb);
|
||||
}
|
||||
|
||||
static void release_tcp_port(struct sock *sk)
|
||||
|
@ -272,8 +272,7 @@ static void chtls_free_uld(struct chtls_dev *cdev)
|
||||
for (i = 0; i < (1 << RSPQ_HASH_BITS); i++)
|
||||
kfree_skb(cdev->rspq_skb_cache[i]);
|
||||
kfree(cdev->lldi);
|
||||
if (cdev->askb)
|
||||
kfree_skb(cdev->askb);
|
||||
kfree_skb(cdev->askb);
|
||||
kfree(cdev);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user