]> git.baikalelectronics.ru Git - kernel.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)
committerJakub Kicinski <kuba@kernel.org>
Fri, 21 Oct 2022 04:09:47 +0000 (21:09 -0700)
commitcb23a833748998886f46dd53f583bc28039e14f5
tree82f8689f5d0f5afd6f80503693bf9c509979ad8d
parent4a584d029a036e36bb0d868a7cee038782ad7101
net: hinic: fix memory leak when reading function table

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

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