Commit 3d2fd995 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 adee13d2
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -225,11 +225,12 @@ int main(int argc, char *argv[])
	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--;