allocate bio_err before memory debugging is enabled to avoid memory leaks
authorBodo Möller <bodo@openssl.org>
Tue, 19 Nov 2002 11:55:47 +0000 (11:55 +0000)
committerBodo Möller <bodo@openssl.org>
Tue, 19 Nov 2002 11:55:47 +0000 (11:55 +0000)
(we can't release it before the CRYPTO_mem_leaks() call!)

Submitted by: Nils Larsch

ssl/ssltest.c

index ed163a22fbe3b2d7e376bf5f6b6bcb981dc6fc7d..692f6a397ea2eb0a61bc688cc089bfcb9ef30ae6 100644 (file)
@@ -367,7 +367,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 */
@@ -385,7 +387,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--;