From: Bodo Möller Date: Tue, 19 Nov 2002 12:10:08 +0000 (+0000) Subject: allocate bio_err before memory debugging is enabled to avoid memory leaks X-Git-Tag: OpenSSL_0_9_6h~22 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3d2fd995733fbc0749961fc21a2bb61d3f83ff48;p=oweals%2Fopenssl.git 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 --- diff --git a/ssl/ssltest.c b/ssl/ssltest.c index c779751b8c..d6704852b4 100644 --- a/ssl/ssltest.c +++ b/ssl/ssltest.c @@ -224,12 +224,13 @@ int main(int argc, char *argv[]) verbose = 0; debug = 0; cipher = 0; - + + bio_err=BIO_new_fp(stderr,BIO_NOCLOSE); + CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON); RAND_seed(rnd_seed, sizeof rnd_seed); - bio_err=BIO_new_fp(stderr,BIO_NOCLOSE); bio_stdout=BIO_new_fp(stdout,BIO_NOCLOSE); argc--;