diff options
author | Pauli <paul.dale@oracle.com> | 2020-08-06 11:11:44 +1000 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2020-08-07 14:16:47 +1000 |
commit | 64827f407b0b603f585d7fadfd7e61a60ed7a45b (patch) | |
tree | 7f4f9e27a1c9dee1aeeb202756f5022d1b30f04f | |
parent | 7d615e2178fbffa53f05a67f68e5741374340308 (diff) |
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)
-rw-r--r-- | test/drbgtest.c | 7 |
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) |