diff options
author | Zhengchao Shao <shaozhengchao@huawei.com> | 2022-12-07 09:50:01 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-12-14 11:37:30 +0100 |
commit | b9274dbe399952a8175db2e1ee148b7c9ba2b538 (patch) | |
tree | 34dfbc8d7f99db29c93eb8a8f005943df4221af7 /drivers/net/macsec.c | |
parent | 7390c70bd431cbfa6951477e2c80a301643e284b (diff) |
net: thunderbolt: fix memory leak in tbnet_open()
[ Upstream commit ed14e5903638f6eb868e3e2b4e610985e6a6c876 ]
When tb_ring_alloc_rx() failed in tbnet_open(), ida that allocated in
tb_xdomain_alloc_out_hopid() is not released. Add
tb_xdomain_release_out_hopid() to the error path to release ida.
Fixes: 180b0689425c ("thunderbolt: Allow multiple DMA tunnels over a single XDomain connection")
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Link: https://lore.kernel.org/r/20221207015001.1755826-1-shaozhengchao@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/net/macsec.c')
0 files changed, 0 insertions, 0 deletions