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, 4 Jan 2023 10:29:02 +0000 (11:29 +0100)
commite60fa800a32a693d672b1a091424d780278c4587
tree6f98e8461eb9153818ae8393dfd03b8b281c07e3
parentb0785edaf649e5f04dc7f75533e810f4c00e4106
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: 4cb586a188d4 ("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