From 4a0a9e5767f23f684267eb19e412d26cb288930d Mon Sep 17 00:00:00 2001 From: Pauli Date: Thu, 30 Jan 2020 09:04:14 +1000 Subject: [PATCH] scrypt: free the MD reference correctly. The code was calling EVP_MD_meth_free which is incorrect. It should call EVP_MD_free. It happened to work but by luck rather than design. Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/10973) --- providers/implementations/kdfs/scrypt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/providers/implementations/kdfs/scrypt.c b/providers/implementations/kdfs/scrypt.c index 425db1af6f..ea859b9150 100644 --- a/providers/implementations/kdfs/scrypt.c +++ b/providers/implementations/kdfs/scrypt.c @@ -75,7 +75,7 @@ static void kdf_scrypt_free(void *vctx) KDF_SCRYPT *ctx = (KDF_SCRYPT *)vctx; if (ctx != NULL) { - EVP_MD_meth_free(ctx->sha256); + EVP_MD_free(ctx->sha256); kdf_scrypt_reset(ctx); OPENSSL_free(ctx); } -- 2.25.1