[PATCH 07/11] lib/crypto: md5: Use hmac_md5_zeroize_ctx() instead of memzero_explicit()

From: Thomas Huth

Date: Thu Aug 13 2026 - 09:53:45 EST


From: Thomas Huth <thuth@xxxxxxxxxx>

It's only cosmetics, but since we have the new hmac_md5_zeroize_ctx()
function anyway, we can also use it here.

Signed-off-by: Thomas Huth <thuth@xxxxxxxxxx>
---
lib/crypto/md5.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/crypto/md5.c b/lib/crypto/md5.c
index 3d2b017a0525a..a8ee57600012d 100644
--- a/lib/crypto/md5.c
+++ b/lib/crypto/md5.c
@@ -271,7 +271,7 @@ void hmac_md5_final(struct hmac_md5_ctx *ctx, u8 out[MD5_DIGEST_SIZE])
cpu_to_le32_array(ctx->ostate.h, ARRAY_SIZE(ctx->ostate.h));
memcpy(out, ctx->ostate.h, MD5_DIGEST_SIZE);

- memzero_explicit(ctx, sizeof(*ctx));
+ hmac_md5_zeroize_ctx(ctx);
}
EXPORT_SYMBOL_GPL(hmac_md5_final);

--
2.55.0