]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Coverity 1545175: use after free
authorPauli <pauli@openssl.org>
Thu, 28 Sep 2023 01:47:35 +0000 (11:47 +1000)
committerPauli <pauli@openssl.org>
Mon, 2 Oct 2023 08:18:21 +0000 (19:18 +1100)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from https://github.com/openssl/openssl/pull/22211)

crypto/rand/rand_lib.c

index 7fbbb0275b0bc85d8320cc3db617f220c9838edd..14999540abc2938d7428cacdfeeaaf67b6bfb039 100644 (file)
@@ -609,7 +609,6 @@ static EVP_RAND_CTX *rand_new_seed(OSSL_LIB_CTX *libctx)
     }
     if (!EVP_RAND_instantiate(ctx, 0, 0, NULL, 0, NULL)) {
         ERR_raise(ERR_LIB_RAND, RAND_R_ERROR_INSTANTIATING_DRBG);
-        EVP_RAND_CTX_free(ctx);
         goto err;
     }
     OPENSSL_free(props);