If memory debugging enabled return error on leaks.
[openssl.git] / test / verify_extra_test.c
index 005fae63c01f1266303a0a17ae19c8712b444ffa..31c391ec1f9a55c1a9c8bd6ab3b817d1a304ca7f 100644 (file)
@@ -207,8 +207,9 @@ int main(int argc, char **argv)
     CRYPTO_cleanup_all_ex_data();
     ERR_remove_thread_state(NULL);
     ERR_free_strings();
-#ifdef CRYPTO_MDEBUG
-    CRYPTO_mem_leaks_fp(stderr);
+#ifndef OPENSSL_NO_CRYPTO_MDEBUG
+    if (CRYPTO_mem_leaks_fp(stderr) <= 0)
+        return 1;
 #endif
 
     printf("PASS\n");