Use File::Path::mkpath rather than File::Path::make_path
[openssl.git] / test / danetest.c
index 636f629617d872a02401ed1ec33e2dbe7fd8d2a1..cad751f4babf51e438f7f0ccacb37207e1f02567 100644 (file)
@@ -471,9 +471,12 @@ int main(int argc, char *argv[])
     CAfile = argv[2];
     tlsafile = argv[3];
 
+    bio_err = BIO_new_fp(stderr, BIO_NOCLOSE | BIO_FP_TEXT);
+
     p = getenv("OPENSSL_DEBUG_MEMORY");
     if (p != NULL && strcmp(p, "on") == 0)
         CRYPTO_set_mem_debug(1);
+    CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON);
 
     f = fopen(tlsafile, "r");
     if (f == NULL) {
@@ -482,8 +485,6 @@ int main(int argc, char *argv[])
         return 0;
     }
 
-    bio_err = BIO_new_fp(stderr, BIO_NOCLOSE | BIO_FP_TEXT);
-
     SSL_library_init();
     SSL_load_error_strings();
 
@@ -526,7 +527,8 @@ end:
     ERR_remove_thread_state(NULL);
     EVP_cleanup();
 #ifndef OPENSSL_NO_CRYPTO_MDEBUG
-    CRYPTO_mem_leaks(bio_err);
+    if (CRYPTO_mem_leaks(bio_err) <= 0)
+        ret = 1;
 #endif
     BIO_free(bio_err);
     EXIT(ret);