mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-08 17:42:09 +03:00
Provide and use internal function mbedtls_zeroize_and_free()
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
This commit is contained in:
@@ -346,9 +346,8 @@ void mbedtls_md_free(mbedtls_md_context_t *ctx)
|
||||
|
||||
#if defined(MBEDTLS_MD_C)
|
||||
if (ctx->hmac_ctx != NULL) {
|
||||
mbedtls_platform_zeroize(ctx->hmac_ctx,
|
||||
mbedtls_zeroize_and_free(ctx->hmac_ctx,
|
||||
2 * ctx->md_info->block_size);
|
||||
mbedtls_free(ctx->hmac_ctx);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user