Browse Source

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 <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/10973)
master
Pauli 3 years ago
parent
commit
4a0a9e5767
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      providers/implementations/kdfs/scrypt.c

+ 1
- 1
providers/implementations/kdfs/scrypt.c View File

@ -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);
}


Loading…
Cancel
Save