trusted-keys: match tpm_get_ops on all return paths
authorBen Boeckel <mathstuf@gmail.com>
Thu, 29 Apr 2021 19:21:56 +0000 (15:21 -0400)
committerJarkko Sakkinen <jarkko@kernel.org>
Wed, 12 May 2021 19:36:37 +0000 (22:36 +0300)
commitb3ad7855b7ae3bed4242894d07bdb7f186652dbe
tree29702fbc09fa26150268f5abbb03d9fb5181a79c
parent83a775d5f9bfda95b1c295f95a3a041a40c7f321
trusted-keys: match tpm_get_ops on all return paths

The `tpm_get_ops` call at the beginning of the function is not paired
with a `tpm_put_ops` on this return path.

Cc: stable@vger.kernel.org
Fixes: f2219745250f ("security: keys: trusted: use ASN.1 TPM2 key format for the blobs")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Ben Boeckel <mathstuf@gmail.com>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
security/keys/trusted-keys/trusted_tpm2.c