提交 ce1294d9 编写于 作者: Z zhong jiang 提交者: Herbert Xu

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: Nzhong jiang <zhongjiang@huawei.com>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 4d407b04
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册