Skip to content
Commit ffcaa217 authored by Jarkko Sakkinen's avatar Jarkko Sakkinen
Browse files

KEYS: trusted: Fix memory leak in tpm2_key_encode()



'scratch' is never freed. Fix this by calling kfree() in the success, and
in the error case.

Cc: stable@vger.kernel.org # +v5.13
Fixes: f2219745 ("security: keys: trusted: use ASN.1 TPM2 key format for the blobs")
Signed-off-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
parent 8f6a15f0
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment