forked from Minki/linux
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: f221974525
("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>
This commit is contained in:
parent
83a775d5f9
commit
b3ad7855b7
@ -336,9 +336,9 @@ out:
|
||||
rc = -EPERM;
|
||||
}
|
||||
if (blob_len < 0)
|
||||
return blob_len;
|
||||
|
||||
payload->blob_len = blob_len;
|
||||
rc = blob_len;
|
||||
else
|
||||
payload->blob_len = blob_len;
|
||||
|
||||
tpm_put_ops(chip);
|
||||
return rc;
|
||||
|
Loading…
Reference in New Issue
Block a user