]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: thunderx: Fix the ACPI memory leak
authorYu Liao <liaoyu15@huawei.com>
Wed, 23 Nov 2022 08:22:36 +0000 (16:22 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 Dec 2022 16:40:02 +0000 (17:40 +0100)
commit11052f118879d44e9f954c35f32be461f77e96f4
tree45e3f3079ce3671b6e0f6040120264bc13c33eaf
parentb034fe2a0800b93ca575ce0d947e3f30b344f87e
net: thunderx: Fix the ACPI memory leak

[ Upstream commit 661e5ebbafd26d9d2e3c749f5cf591e55c7364f5 ]

The ACPI buffer memory (string.pointer) should be freed as the buffer is
not used after returning from bgx_acpi_match_id(), free it to prevent
memory leak.

Fixes: 46b903a01c05 ("net, thunder, bgx: Add support to get MAC address from ACPI.")
Signed-off-by: Yu Liao <liaoyu15@huawei.com>
Link: https://lore.kernel.org/r/20221123082237.1220521-1-liaoyu15@huawei.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/cavium/thunder/thunder_bgx.c