diff options
author | Bodo Möller <bodo@openssl.org> | 2002-11-19 11:56:05 +0000 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 2002-11-19 11:56:05 +0000 |
commit | 1e3a9b650f2504af1211275433867cface88a5de (patch) | |
tree | 3797b4a8fee4dfab7caa6676f6bd25df0fb67ef3 /ssl | |
parent | 229dc0ee31d25aa04a52e08df46483cc866a1336 (diff) | |
download | openssl-1e3a9b650f2504af1211275433867cface88a5de.tar.gz |
allocate bio_err before memory debugging is enabled to avoid memory leaks
(we can't release it before the CRYPTO_mem_leaks() call!)
Submitted by: Nils Larsch
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/ssltest.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ssl/ssltest.c b/ssl/ssltest.c index 035a4d2deb..c60a8acddb 100644 --- a/ssl/ssltest.c +++ b/ssl/ssltest.c @@ -385,7 +385,9 @@ int main(int argc, char *argv[]) verbose = 0; debug = 0; cipher = 0; - + + bio_err=BIO_new_fp(stderr,BIO_NOCLOSE); + CRYPTO_set_locking_callback(lock_dbg_cb); /* enable memory leak checking unless explicitly disabled */ @@ -403,7 +405,6 @@ int main(int argc, char *argv[]) RAND_seed(rnd_seed, sizeof rnd_seed); - bio_err=BIO_new_fp(stderr,BIO_NOCLOSE); bio_stdout=BIO_new_fp(stdout,BIO_NOCLOSE); argc--; |