If memory debugging enabled return error on leaks.
[openssl.git] / test / dsatest.c
index 1f2c259fee8bf10a84110f19650dd5ad43bf269b..f36b4494d077eb5bbd2f64deb0f70606de05bcf3 100644 (file)
@@ -1,4 +1,3 @@
-/* crypto/dsa/dsatest.c */
 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
  * All rights reserved.
  *
@@ -216,7 +215,8 @@ int main(int argc, char **argv)
     ERR_remove_thread_state(NULL);
     ERR_free_strings();
 #ifndef OPENSSL_NO_CRYPTO_MDEBUG
-    CRYPTO_mem_leaks(bio_err);
+    if (CRYPTO_mem_leaks(bio_err) <= 0)
+        ret = 0;
 #endif
     BIO_free(bio_err);
     bio_err = NULL;