summaryrefslogtreecommitdiffstats
path: root/crypto/mem_dbg.c
diff options
context:
space:
mode:
authorGeoff Thorpe <geoff@openssl.org>2001-08-27 22:12:56 +0000
committerGeoff Thorpe <geoff@openssl.org>2001-08-27 22:12:56 +0000
commit5e2c4e23f4f42cf31d75ea6735fbdca7011be3be (patch)
treecca78cae71059f7becb584824e42de0063970eb4 /crypto/mem_dbg.c
parent35780c2139f7abcb9af5a913ad41d2cd59de1215 (diff)
Make sure "CRYPTO_mem_leaks_fp" doesn't itself create a reportable memory
leak.
Diffstat (limited to 'crypto/mem_dbg.c')
-rw-r--r--crypto/mem_dbg.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/crypto/mem_dbg.c b/crypto/mem_dbg.c
index 4e851de3d8..ed28233071 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;
+ /* 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();
if ((b=BIO_new(BIO_s_file())) == NULL)
return;
+ MemCheck_on();
BIO_set_fp(b,fp,BIO_NOCLOSE);
CRYPTO_mem_leaks(b);
BIO_free(b);