mirror of https://github.com/openssl/openssl.git
kdf_scrypt_reset(): NULLify freed pointers
Otherwise doublefree happens with further usage.
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/26488)
(cherry picked from commit 901b108154)
This commit is contained in:
parent
231d2297a6
commit
3f40345597
|
|
@ -94,7 +94,9 @@ static void kdf_scrypt_reset(void *vctx)
|
|||
KDF_SCRYPT *ctx = (KDF_SCRYPT *)vctx;
|
||||
|
||||
OPENSSL_free(ctx->salt);
|
||||
ctx->salt = NULL;
|
||||
OPENSSL_clear_free(ctx->pass, ctx->pass_len);
|
||||
ctx->pass = NULL;
|
||||
kdf_scrypt_init(ctx);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue