]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
scrypt: Do not free the context itself when fetch fails
authorTomas Mraz <tomas@openssl.org>
Mon, 20 Jan 2025 07:50:48 +0000 (08:50 +0100)
committerTomas Mraz <tomas@openssl.org>
Thu, 23 Jan 2025 11:07:33 +0000 (12:07 +0100)
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/26488)

providers/implementations/kdfs/scrypt.c

index b2b0f094aae3e21ba53757aece7fff2696425bb7..7d9456dd742809ab7ac76b67c86dbf6fe59fe87e 100644 (file)
@@ -162,7 +162,6 @@ static int set_digest(KDF_SCRYPT *ctx)
     EVP_MD_free(ctx->sha256);
     ctx->sha256 = EVP_MD_fetch(ctx->libctx, "sha256", ctx->propq);
     if (ctx->sha256 == NULL) {
-        OPENSSL_free(ctx);
         ERR_raise(ERR_LIB_PROV, PROV_R_UNABLE_TO_LOAD_SHA256);
         return 0;
     }