Commit 8faad520 authored by Bodo Möller's avatar Bodo Möller
Browse files

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
parent 8f89ae92
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -368,6 +368,8 @@ int main(int argc, char *argv[])
	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--;