From ee5a79104c4f7f59343a7b75815be3979a0f6b83 Mon Sep 17 00:00:00 2001 From: Bernd Edlinger Date: Tue, 30 Oct 2018 20:57:53 +0100 Subject: [PATCH] Fix error handling in rand_drbg_new Reviewed-by: Matthias St. Pierre Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/7519) --- crypto/rand/drbg_lib.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/crypto/rand/drbg_lib.c b/crypto/rand/drbg_lib.c index b9c1cca0e0..1471681cf4 100644 --- a/crypto/rand/drbg_lib.c +++ b/crypto/rand/drbg_lib.c @@ -234,10 +234,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; } -- 2.25.1