summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2016-03-08 20:59:50 +0000
committerMatt Caswell <matt@openssl.org>2016-03-09 01:14:57 +0000
commitf58cee8fb47da29ec44e3429e8cf630afd046b79 (patch)
treec96cc3363fc22525046acfe59a3e8900b8a44c9b /test
parent8eed7e873bb54ab46b15e6efa3aff416e02f4d7f (diff)
Fix memory leak in ssltest
The new Rand usage of Thread API exposed a bug in ssltest. ssltest "cheats" and uses internal headers to directly call functions that normally you wouldn't be able to do. This means that auto-init doesn't happen, and therefore auto-deinit doesn't happen either, meaning that the new rand locks don't get cleaned up properly. Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'test')
-rw-r--r--test/ssltest.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ssltest.c b/test/ssltest.c
index 94aeebe9c0..8d9b2c8b1d 100644
--- a/test/ssltest.c
+++ b/test/ssltest.c
@@ -3617,6 +3617,12 @@ static int do_test_cipherlist(void)
int i = 0;
const SSL_METHOD *meth;
const SSL_CIPHER *ci, *tci = NULL;
+
+ /*
+ * This is required because ssltest "cheats" and uses internal headers to
+ * call functions, thus avoiding auto-init
+ */
+ OPENSSL_init_crypto(0, NULL);
#endif
#ifndef OPENSSL_NO_SSL3