From: Bernd Edlinger Date: Fri, 16 Mar 2018 14:32:25 +0000 (+0100) Subject: Fixed a crash in error handing of rand_drbg_new X-Git-Tag: OpenSSL_1_1_1-pre3~51 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f96ff4e908aec7403451d3fa7fc37239b351085a;p=oweals%2Fopenssl.git Fixed a crash in error handing of rand_drbg_new Reviewed-by: Matthias St. Pierre Reviewed-by: Kurt Roeckx Reviewed-by: Ben Kaduk (Merged from https://github.com/openssl/openssl/pull/5646) --- diff --git a/crypto/rand/drbg_lib.c b/crypto/rand/drbg_lib.c index 360e77565c..02ad071ad4 100644 --- a/crypto/rand/drbg_lib.c +++ b/crypto/rand/drbg_lib.c @@ -218,7 +218,7 @@ static RAND_DRBG *rand_drbg_new(int secure, if (drbg == NULL) { RANDerr(RAND_F_RAND_DRBG_NEW, ERR_R_MALLOC_FAILURE); - goto err; + return NULL; } drbg->secure = secure && CRYPTO_secure_allocated(drbg);