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

commit 37e90c374dd11cf4919c51e847c6d6ced0abc555 upstream.

In crb_acpi_add(), we get the TPM2 table to retrieve information
like start method, and then assign them to the priv data, so the
TPM2 table is not used after the init, should be freed, call
acpi_put_table() to fix the memory leak.

Fixes: 8abae1197d97 ("tpm: TPM 2.0 CRB Interface")
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>
drivers/char/tpm/tpm_crb.c