Fix error handling in rand_drbg_new
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/7519)
This commit is contained in:
parent
f98a893ed4
commit
ee5a79104c
1 changed files with 1 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue