diff options
author | Hanjun Guo <guohanjun@huawei.com> | 2022-11-17 14:23:40 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-01-14 12:16:28 +0300 |
commit | 8ddc48068ac85740d3d5f9f3b0b323e733a35b33 (patch) | |
tree | 5225912abbbd14777b509d23cea3b4f8663b407d /drivers/leds/leds-lp50xx.c | |
parent | b51d5fed9f53e07ce9fc65efb4ff1abe021a4c16 (diff) | |
download | linux-8ddc48068ac85740d3d5f9f3b0b323e733a35b33.tar.xz |
tpm: acpi: Call acpi_put_table() to fix memory leak
commit 8740a12ca2e2959531ad253bac99ada338b33d80 upstream.
The start and length of the event log area are obtained from
TPM2 or TCPA table, so we call acpi_get_table() to get the
ACPI information, but the acpi_get_table() should be coupled with
acpi_put_table() to release the ACPI memory, add the acpi_put_table()
properly to fix the memory leak.
While we are at it, remove the redundant empty line at the
end of the tpm_read_log_acpi().
Fixes: 0bfb23746052 ("tpm: Move eventlog files to a subdirectory")
Fixes: 85467f63a05c ("tpm: Add support for event log pointer found in TPM2 ACPI table")
Cc: stable@vger.kernel.org
Signed-off-by: Hanjun Guo <guohanjun@huawei.com>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/leds/leds-lp50xx.c')
0 files changed, 0 insertions, 0 deletions