]> git.baikalelectronics.ru Git - kernel.git/commit
chtls: Fix potential resource leak
authorPan Bian <bianpan2016@163.com>
Thu, 21 Jan 2021 14:57:38 +0000 (06:57 -0800)
committerJakub Kicinski <kuba@kernel.org>
Sat, 23 Jan 2021 21:19:56 +0000 (13:19 -0800)
commit4cc96addbddda33f4cf1dc7cf0cf14d59675e1c0
tree7a39aa2a6532a762293e9d2ba2c2858140b8aff8
parentf040c24425221bdd5cd67c0d52ab8cf163e80b8e
chtls: Fix potential resource leak

The dst entry should be released if no neighbour is found. Goto label
free_dst to fix the issue. Besides, the check of ndev against NULL is
redundant.

Signed-off-by: Pan Bian <bianpan2016@163.com>
Link: https://lore.kernel.org/r/20210121145738.51091-1-bianpan2016@163.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.c