提交 055076cd 编写于 作者: 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
上级 527497a7
......@@ -229,6 +229,10 @@ int main(int Argc, char *Argv[])
arg.data=NULL;
arg.count=0;
if (bio_err == NULL)
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
if (getenv("OPENSSL_DEBUG_MEMORY") != NULL) /* if not defined, use compiled-in library defaults */
{
if (!(0 == strcmp(getenv("OPENSSL_DEBUG_MEMORY"), "off")))
......@@ -253,10 +257,6 @@ int main(int Argc, char *Argv[])
apps_startup();
if (bio_err == NULL)
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
/* Lets load up our environment a little */
p=getenv("OPENSSL_CONF");
if (p == NULL)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册