提交 b3ad7855 编写于 作者: B Ben Boeckel 提交者: Jarkko Sakkinen

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: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NBen Boeckel <mathstuf@gmail.com>
Reviewed-by: NJarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: NJarkko Sakkinen <jarkko@kernel.org>
上级 83a775d5
......@@ -336,9 +336,9 @@ int tpm2_seal_trusted(struct tpm_chip *chip,
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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册