From 3ae34e3a8c2e8902eb42b61a9554f4e988553fbb Mon Sep 17 00:00:00 2001 From: Geoff Thorpe Date: Tue, 28 Aug 2001 15:54:57 +0000 Subject: [PATCH] =?utf8?q?Ensure=20that=20failure=20to=20create=20the=20BI?= =?utf8?q?O=20in=20'CRYPTO=5Fmem=5Fleaks=5Ffp'=20doesn't=20leave=20memory?= =?utf8?q?=20debugging=20turned=20off.=20[Spotted=20by=20G=C3=B6tz=20Babin?= =?utf8?q?-Ebell]?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- crypto/mem_dbg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto/mem_dbg.c b/crypto/mem_dbg.c index ed28233071..1c4e04f51f 100644 --- a/crypto/mem_dbg.c +++ b/crypto/mem_dbg.c @@ -741,9 +741,9 @@ void CRYPTO_mem_leaks_fp(FILE *fp) * as we're creating them at a time when we're trying to check we've not * left anything un-free()'d!! */ MemCheck_off(); - if ((b=BIO_new(BIO_s_file())) == NULL) - return; + b = BIO_new(BIO_s_file()); MemCheck_on(); + if(!b) return; BIO_set_fp(b,fp,BIO_NOCLOSE); CRYPTO_mem_leaks(b); BIO_free(b); -- 2.25.1