mirror of
https://github.com/openssl/openssl.git
synced 2025-01-18 13:44:20 +08:00
Stop library before checking for mem leaks
With the new init framework resources aren't released until the process exits. This means checking for mem leaks before that point finds a lot of things! We should explicitly close down the library if we're checking for mem leaks. Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
parent
7839b735d8
commit
38a6d7f89a
@ -639,6 +639,9 @@ int CRYPTO_mem_leaks(BIO *b)
|
||||
if (mh == NULL && amih == NULL)
|
||||
return 1;
|
||||
|
||||
/* Ensure all resources are released */
|
||||
OPENSSL_INIT_library_stop();
|
||||
|
||||
CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE);
|
||||
|
||||
ml.bio = b;
|
||||
|
Loading…
Reference in New Issue
Block a user