]> git.baikalelectronics.ru Git - kernel.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>
Thu, 8 Dec 2022 10:22:59 +0000 (11:22 +0100)
commitc4ffa17e214e9473da823588ca61200123e7334f
tree66d5b69c08327147ff7e7ca9a8ec76da606812f9
parenteabf4c147d7d8b07d5095e1ae8517277c497f11e
net: thunderx: Fix the ACPI memory leak

[ Upstream commit db507da88e98730603ba24ca94885c368ce005e0 ]

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: 8144d1b1e9ee ("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