Forcibly enable memory leak checking during "make test"
[openssl.git] / crypto / ec / ectest.c
index 1ccc9ab8c56fd99e8b5ec9afe7f8b7bac70d8439..ac0f055faf0432e2506c66b2318930bfc0da3452 100644 (file)
@@ -149,6 +149,12 @@ int main(int argc, char *argv[])
        unsigned char buf[100];
        size_t i, len;
        
+       /* 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);
        ERR_load_crypto_strings();
 
@@ -577,7 +583,7 @@ int main(int argc, char *argv[])
        }
 
 
-#if 1
+#if 0
        timings(P_192, 0, ctx);
        timings(P_192, 1, ctx);
        timings(P_224, 0, ctx);