]> git.baikalelectronics.ru Git - kernel.git/commit
mctp: Fix an error handling path in mctp_init()
authorWei Yongjun <weiyongjun1@huawei.com>
Tue, 8 Nov 2022 09:55:17 +0000 (09:55 +0000)
committerJakub Kicinski <kuba@kernel.org>
Thu, 10 Nov 2022 03:26:08 +0000 (19:26 -0800)
commitc733764da6507819df3ea4cd6cb2fbfac859bb49
tree8fb0cb8fb49e8d8b74bf72e6f7f06ba92b9cd567
parent4b1f9f36057adedca4dd61ce23ea338ad008a62a
mctp: Fix an error handling path in mctp_init()

If mctp_neigh_init() return error, the routes resources should
be released in the error handling path. Otherwise some resources
leak.

Fixes: 8a4c5bf9e2da ("mctp: Add neighbour implementation")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by: Matt Johnston <matt@codeconstruct.com.au>
Link: https://lore.kernel.org/r/20221108095517.620115-1-weiyongjun@huaweicloud.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/mctp/af_mctp.c
net/mctp/route.c