]> git.baikalelectronics.ru Git - kernel.git/commit
tpm: tpm_tis: Add the missed acpi_put_table() to fix memory leak
authorHanjun Guo <guohanjun@huawei.com>
Thu, 17 Nov 2022 11:23:42 +0000 (19:23 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:41:45 +0000 (11:41 +0100)
commit74c868a8a63621f3870c7ee8f22f0e8174509422
tree728e01ba7d04a963d332964f0854e36620f85009
parent42dbb397334dab933e55042a72ae0514064085ca
tpm: tpm_tis: Add the missed acpi_put_table() to fix memory leak

commit db9622f762104459ff87ecdf885cc42c18053fd9 upstream.

In check_acpi_tpm2(), we get the TPM2 table just to make
sure the table is there, not used after the init, so the
acpi_put_table() should be added to release the ACPI memory.

Fixes: 5774c0c63655 ("tpm_tis: Consolidate the platform and acpi probe flow")
Cc: stable@vger.kernel.org
Signed-off-by: Hanjun Guo <guohanjun@huawei.com>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/tpm/tpm_tis.c