aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/dsa/dsatest.c
diff options
context:
space:
mode:
authorBodo Möller <bodo@openssl.org>1999-06-25 13:41:35 +0000
committerBodo Möller <bodo@openssl.org>1999-06-25 13:41:35 +0000
commit227cd06ffea642eb155449888a46159481afe0d0 (patch)
treeaee5acc0320a02599e08fec63a124c82624485d2 /crypto/dsa/dsatest.c
parent9b67b4b3caf071f490b95128f5dd44d9ce52032d (diff)
downloadopenssl-227cd06ffea642eb155449888a46159481afe0d0.tar.gz
Avoid some memory holes, one of which was pointed out by
"Chad C. Mulligan" <mulligan@antipope.org>.
Diffstat (limited to 'crypto/dsa/dsatest.c')
-rw-r--r--crypto/dsa/dsatest.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/crypto/dsa/dsatest.c b/crypto/dsa/dsatest.c
index 38dd0c0c4d..70aa8ca28d 100644
--- a/crypto/dsa/dsatest.c
+++ b/crypto/dsa/dsatest.c
@@ -134,6 +134,8 @@ int main(int argc, char **argv)
if (bio_err == NULL)
bio_err=BIO_new_fp(stderr,BIO_NOCLOSE);
+ CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ENABLE);
+
BIO_printf(bio_err,"test generation of DSA parameters\n");
BIO_printf(bio_err,"expect '.*' followed by 5 lines of '.'s and '+'s\n");
dsa=DSA_generate_parameters(512,seed,20,&counter,&h,dsa_cb,
@@ -190,8 +192,9 @@ int main(int argc, char **argv)
end:
if (!ret)
ERR_print_errors(bio_err);
- if (bio_err != NULL) BIO_free(bio_err);
if (dsa != NULL) DSA_free(dsa);
+ CRYPTO_mem_leaks(bio_err);
+ if (bio_err != NULL) BIO_free(bio_err);
exit(!ret);
return(0);
}