提交 1e3a9b65 编写于 作者: B Bodo Möller

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
上级 229dc0ee
...@@ -385,7 +385,9 @@ int main(int argc, char *argv[]) ...@@ -385,7 +385,9 @@ int main(int argc, char *argv[])
verbose = 0; verbose = 0;
debug = 0; debug = 0;
cipher = 0; cipher = 0;
bio_err=BIO_new_fp(stderr,BIO_NOCLOSE);
CRYPTO_set_locking_callback(lock_dbg_cb); CRYPTO_set_locking_callback(lock_dbg_cb);
/* enable memory leak checking unless explicitly disabled */ /* enable memory leak checking unless explicitly disabled */
...@@ -403,7 +405,6 @@ int main(int argc, char *argv[]) ...@@ -403,7 +405,6 @@ int main(int argc, char *argv[])
RAND_seed(rnd_seed, sizeof rnd_seed); RAND_seed(rnd_seed, sizeof rnd_seed);
bio_err=BIO_new_fp(stderr,BIO_NOCLOSE);
bio_stdout=BIO_new_fp(stdout,BIO_NOCLOSE); bio_stdout=BIO_new_fp(stdout,BIO_NOCLOSE);
argc--; argc--;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册