From: Bernd Edlinger Date: Tue, 30 Oct 2018 19:57:53 +0000 (+0100) Subject: Fix error handling in rand_drbg_new X-Git-Tag: openssl-3.0.0-alpha1~2939 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c5e0b3a6d5f02aa53cf2a7c0cffb42e434ee3470;p=thirdparty%2Fopenssl.git Fix error handling in rand_drbg_new Reviewed-by: Matthias St. Pierre Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/7517) --- diff --git a/crypto/rand/drbg_lib.c b/crypto/rand/drbg_lib.c index f518ce51388..cd298a7e167 100644 --- a/crypto/rand/drbg_lib.c +++ b/crypto/rand/drbg_lib.c @@ -295,10 +295,7 @@ static RAND_DRBG *rand_drbg_new(int secure, return drbg; err: - if (drbg->secure) - OPENSSL_secure_free(drbg); - else - OPENSSL_free(drbg); + RAND_DRBG_free(drbg); return NULL; }