summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/drbgtest.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/drbgtest.c b/test/drbgtest.c
index 2d72055cc7..c6c8438e98 100644
--- a/test/drbgtest.c
+++ b/test/drbgtest.c
@@ -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)