drbgtest: avoid a memory leak

Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
(Merged from https://github.com/openssl/openssl/pull/12509)
master
Pauli 3 years ago
parent 7d615e2178
commit 64827f407b

@ -627,6 +627,13 @@ err:
int setup_tests(void)
{
/*
* TODO(3.0): figure out why and fix.
* Create the primary DRBG here to avoid a memory leak if it is done in
* the test cases.
*/
if (RAND_get0_primary(NULL) == NULL)
return 0;
ADD_TEST(test_rand_drbg_reseed);
ADD_TEST(test_rand_drbg_prediction_resistance);
#if defined(OPENSSL_THREADS)

Loading…
Cancel
Save