Skip to content
Commit 73315f7b authored by Thomas Altenbach's avatar Thomas Altenbach Committed by David Brown
Browse files

bootutil: Fix memory leak in HKDF implementation



The bootutil_hmac_sha256_set_key routine performs some dynamic memory
allocations when mbedTLS is used. To properly free the allocated memory,
bootutil_hmac_sha256_drop must be called before reinitializing the HMAC
context using bootutil_hmac_sha256_init.  However, in the hkdf routine,
the HMAC context was freed only once even though it was initialized
multiple times.

Signed-off-by: default avatarThomas Altenbach <thomas.altenbach@legrand.com>
parent 453096b1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment