]> www.infradead.org Git - users/dwmw2/linux.git/commit
net: hinic: fix memory leak when reading function table
authorZhengchao Shao <shaozhengchao@huawei.com>
Wed, 19 Oct 2022 09:57:52 +0000 (17:57 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Nov 2022 14:57:51 +0000 (23:57 +0900)
commitbb01910763f935b16538084b4269696e0de17f79
tree4767466b26c8bb9b240e1ade5b746654fb421034
parentce605b68db5316f7def485d6c4f790b26174698b
net: hinic: fix memory leak when reading function table

[ Upstream commit 4c1f602df8956bc0decdafd7e4fc7eef50c550b1 ]

When the input parameter idx meets the expected case option in
hinic_dbg_get_func_table(), read_data is not released. Fix it.

Fixes: 5215e16244ee ("hinic: add support to query function table")
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/huawei/hinic/hinic_debugfs.c