X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Fmem_dbg.c;h=1c4e04f51fc480f70e655815157096a9ef40efa5;hb=cd4c36adb8cf159a1ea86a3e0b1ff2f222016937;hp=4e851de3d82197fc89b7313acb8f7f3e043d2014;hpb=0774f470d97f4e4a8cf9dde9bdebe28f8f0e9558;p=oweals%2Fopenssl.git diff --git a/crypto/mem_dbg.c b/crypto/mem_dbg.c index 4e851de3d8..1c4e04f51f 100644 --- a/crypto/mem_dbg.c +++ b/crypto/mem_dbg.c @@ -737,8 +737,13 @@ void CRYPTO_mem_leaks_fp(FILE *fp) BIO *b; if (mh == NULL) return; - if ((b=BIO_new(BIO_s_file())) == NULL) - return; + /* Need to turn off memory checking when allocated BIOs ... especially + * as we're creating them at a time when we're trying to check we've not + * left anything un-free()'d!! */ + MemCheck_off(); + 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);