Ensure that failure to create the BIO in 'CRYPTO_mem_leaks_fp' doesn't
leave memory debugging turned off. [Spotted by Götz Babin-Ebell]
This commit is contained in:
parent
1f3b65801b
commit
3ae34e3a8c
@ -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
|
* as we're creating them at a time when we're trying to check we've not
|
||||||
* left anything un-free()'d!! */
|
* left anything un-free()'d!! */
|
||||||
MemCheck_off();
|
MemCheck_off();
|
||||||
if ((b=BIO_new(BIO_s_file())) == NULL)
|
b = BIO_new(BIO_s_file());
|
||||||
return;
|
|
||||||
MemCheck_on();
|
MemCheck_on();
|
||||||
|
if(!b) return;
|
||||||
BIO_set_fp(b,fp,BIO_NOCLOSE);
|
BIO_set_fp(b,fp,BIO_NOCLOSE);
|
||||||
CRYPTO_mem_leaks(b);
|
CRYPTO_mem_leaks(b);
|
||||||
BIO_free(b);
|
BIO_free(b);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user