diff options
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/ssltest.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ssl/ssltest.c b/ssl/ssltest.c index 865ff7a702..a19f70380c 100644 --- a/ssl/ssltest.c +++ b/ssl/ssltest.c @@ -353,6 +353,12 @@ int main(int argc, char *argv[]) CRYPTO_set_locking_callback(lock_dbg_cb); + /* enable memory leak checking unless explicitly disabled */ + if (!((getenv("OPENSSL_DEBUG_MEMORY") != NULL) && (0 == strcmp(getenv("OPENSSL_DEBUG_MEMORY"), "off")))) + { + CRYPTO_malloc_debug_init(); + CRYPTO_dbg_set_options(V_CRYPTO_MDEBUG_ALL); + } CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON); RAND_seed(rnd_seed, sizeof rnd_seed); |