Fixed a crash in error handing of rand_drbg_new
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Fri, 16 Mar 2018 14:32:25 +0000 (15:32 +0100)
committerBernd Edlinger <bernd.edlinger@hotmail.de>
Sat, 17 Mar 2018 07:19:41 +0000 (08:19 +0100)
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/5646)

crypto/rand/drbg_lib.c

index 360e77565c0e4b0ada4b434e3b0cc99aa7debff1..02ad071ad4cc8eeeafb2ff31807d57c3d1ede4cf 100644 (file)
@@ -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);