Star64_linux/drivers/char/tpm/eventlog
Hanjun Guo 8740a12ca2 tpm: acpi: Call acpi_put_table() to fix memory leak
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: 0bfb237460 ("tpm: Move eventlog files to a subdirectory")
Fixes: 85467f63a0 ("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>
2022-12-08 16:20:47 +00:00
..
acpi.c tpm: acpi: Call acpi_put_table() to fix memory leak 2022-12-08 16:20:47 +00:00
common.c tpm: vtpm_proxy: Avoid reading host log when using a virtual device 2021-04-14 16:30:30 +03:00
common.h tpm: Move eventlog declarations to its own header 2018-05-09 14:45:46 +03:00
efi.c tpm: efi: Use local variable for calculating final log size 2021-04-14 16:30:29 +03:00
of.c tpm: of: Handle IBM,vtpm20 case when getting log parameters 2020-03-13 17:31:26 +02:00
tpm1.c tpm: Fix fall-through warnings for Clang 2021-02-16 10:40:27 +02:00
tpm2.c tpm: eventlog: Replace zero-length array with flexible-array member 2020-05-22 18:50:12 +03:00