]> 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)
commit647307e8bd7462b1e1c9cdc7e1665ff16bfb5432
tree728e01ba7d04a963d332964f0854e36620f85009
parentcaf6b25dbc329060b9fc3a87da71f90fc85dd27f
tpm: tpm_tis: Add the missed acpi_put_table() to fix memory leak

commit e668b195d5a46ca8fa531c15719c9901474cf622 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: bc029e049981 ("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