summaryrefslogtreecommitdiffstats
path: root/test/exptest.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2016-03-09 00:03:50 +0000
committerMatt Caswell <matt@openssl.org>2016-03-09 01:14:57 +0000
commitbfd53c32cd840ed381ba557c4de8f21e3615655c (patch)
treeb133072050967890c5810302d353eb32fa665936 /test/exptest.c
parentf58cee8fb47da29ec44e3429e8cf630afd046b79 (diff)
Ensure CRYPTO_mem_leaks is the last thing we do
CRYPTO_mem_leaks de-inits the library, so we must not do anything interesting after we've used it! Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'test/exptest.c')
-rw-r--r--test/exptest.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/exptest.c b/test/exptest.c
index 84d76be403..bc023ef67e 100644
--- a/test/exptest.c
+++ b/test/exptest.c
@@ -297,6 +297,9 @@ int main(int argc, char *argv[])
BN_free(m);
BN_CTX_free(ctx);
+ if (test_exp_mod_zero() != 0)
+ goto err;
+
#ifndef OPENSSL_NO_CRYPTO_MDEBUG
if (CRYPTO_mem_leaks(out) <= 0)
goto err;
@@ -304,9 +307,6 @@ int main(int argc, char *argv[])
BIO_free(out);
printf("\n");
- if (test_exp_mod_zero() != 0)
- goto err;
-
printf("done\n");
EXIT(0);