diff --git a/boot/bootutil/include/bootutil/crypto/aes_ctr.h b/boot/bootutil/include/bootutil/crypto/aes_ctr.h index e69b0372..50d36a4f 100644 --- a/boot/bootutil/include/bootutil/crypto/aes_ctr.h +++ b/boot/bootutil/include/bootutil/crypto/aes_ctr.h @@ -53,9 +53,7 @@ static inline void bootutil_aes_ctr_init(bootutil_aes_ctr_context *ctx) static inline void bootutil_aes_ctr_drop(bootutil_aes_ctr_context *ctx) { - /* XXX: config defines MBEDTLS_PLATFORM_NO_STD_FUNCTIONS so no need to free */ - /* (void)mbedtls_aes_free(ctx); */ - (void)ctx; + mbedtls_aes_free(ctx); } static inline int bootutil_aes_ctr_set_key(bootutil_aes_ctr_context *ctx, const uint8_t *k) diff --git a/boot/bootutil/include/bootutil/crypto/aes_kw.h b/boot/bootutil/include/bootutil/crypto/aes_kw.h index cf3194f9..34045c2d 100644 --- a/boot/bootutil/include/bootutil/crypto/aes_kw.h +++ b/boot/bootutil/include/bootutil/crypto/aes_kw.h @@ -45,9 +45,7 @@ static inline void bootutil_aes_kw_init(bootutil_aes_kw_context *ctx) static inline void bootutil_aes_kw_drop(bootutil_aes_kw_context *ctx) { - /* XXX: config defines MBEDTLS_PLATFORM_NO_STD_FUNCTIONS so no need to free */ - /* (void)mbedtls_aes_free(ctx); */ - (void)ctx; + mbedtls_nist_kw_free(ctx); } static inline int bootutil_aes_kw_set_unwrap_key(bootutil_aes_kw_context *ctx, const uint8_t *k, uint32_t klen) diff --git a/boot/bootutil/include/bootutil/crypto/sha.h b/boot/bootutil/include/bootutil/crypto/sha.h index 9ce54bee..704a123e 100644 --- a/boot/bootutil/include/bootutil/crypto/sha.h +++ b/boot/bootutil/include/bootutil/crypto/sha.h @@ -126,9 +126,7 @@ static inline int bootutil_sha_init(bootutil_sha_context *ctx) static inline int bootutil_sha_drop(bootutil_sha_context *ctx) { - /* XXX: config defines MBEDTLS_PLATFORM_NO_STD_FUNCTIONS so no need to free */ - /* (void)mbedtls_sha256_free(ctx); */ - (void)ctx; + mbedtls_sha256_free(ctx); return 0; }