From: Bernd Edlinger Date: Fri, 2 Nov 2018 10:46:38 +0000 (+0100) Subject: Fix error handling in RAND_DRBG_uninstantiate X-Git-Tag: OpenSSL_1_1_1a~42 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=c40c1ef4f3c3a6a4d7878bbf8b13742a5bffd963;p=oweals%2Fopenssl.git Fix error handling in RAND_DRBG_uninstantiate Reviewed-by: Matthias St. Pierre Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/7519) --- diff --git a/crypto/rand/drbg_lib.c b/crypto/rand/drbg_lib.c index 1471681cf4..73fd942914 100644 --- a/crypto/rand/drbg_lib.c +++ b/crypto/rand/drbg_lib.c @@ -374,6 +374,7 @@ int RAND_DRBG_instantiate(RAND_DRBG *drbg, int RAND_DRBG_uninstantiate(RAND_DRBG *drbg) { if (drbg->meth == NULL) { + drbg->state = DRBG_ERROR; RANDerr(RAND_F_RAND_DRBG_UNINSTANTIATE, RAND_R_NO_DRBG_IMPLEMENTATION_SELECTED); return 0;