Make it so we can dynamically enable memory allocation debugging through the
authorRichard Levitte <levitte@openssl.org>
Tue, 1 Aug 2000 17:15:36 +0000 (17:15 +0000)
committerRichard Levitte <levitte@openssl.org>
Tue, 1 Aug 2000 17:15:36 +0000 (17:15 +0000)
environment variable OPENSSL_DEBUG_MEMORY (existence is sufficient).  At the
same time, it makes sure that CRYPTO_malloc_debug_init() gets expanded some-
where and thereby tested for compilation.

apps/openssl.c

index 5f0ffa9fd49704bccb5cb30ad4eb8114c0064a0d..c3680c5e711661b15c4edbacda642cf7c04adc13 100644 (file)
@@ -101,6 +101,8 @@ int main(int Argc, char *Argv[])
        arg.data=NULL;
        arg.count=0;
 
        arg.data=NULL;
        arg.count=0;
 
+       if (getenv("OPENSSL_DEBUG_MEMORY") != NULL)
+               CRYPTO_malloc_debug_init();
        CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON);
 
        apps_startup();
        CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON);
 
        apps_startup();