Commit b3ad7855 authored by Ben Boeckel's avatar Ben Boeckel Committed by Jarkko Sakkinen
Browse files

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: f2219745 ("security: keys: trusted: use ASN.1 TPM2 key format for the blobs")
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarBen Boeckel <mathstuf@gmail.com>
Reviewed-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
parent 83a775d5
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -336,8 +336,8 @@ int tpm2_seal_trusted(struct tpm_chip *chip,
			rc = -EPERM;
	}
	if (blob_len < 0)
		return blob_len;

		rc = blob_len;
	else
		payload->blob_len = blob_len;

	tpm_put_ops(chip);