Use MemCheck_start() instead of CRYPTO_mem_ctrl(), and generate a small leak to test (conditional)
diff --git a/apps/openssl.c b/apps/openssl.c index 9a337fb..27073f5 100644 --- a/apps/openssl.c +++ b/apps/openssl.c
@@ -136,7 +136,7 @@ if ((bio_err=BIO_new(BIO_s_file())) != NULL) BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT); - CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON); + MemCheck_start() ERR_load_crypto_strings(); @@ -236,6 +236,13 @@ EVP_cleanup(); ERR_free_strings(); +#ifdef LEVITTE_DEBUG + { + /* Just to make sure I get a memory leak I can see :-) */ + char *p = Malloc(1024); + } +#endif + CRYPTO_mem_leaks(bio_err); if (bio_err != NULL) {