X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fmem_dbg.c;h=2b8cf73028deac21ff1ec542dd44fb293179620b;hp=d4d72f25c6f1756ed7f4e2b59002d7ee5068d990;hb=1ee7b8b97c90e8e59627bfcbda3714f18368a9e1;hpb=6e08e9e7ccf00aba847351adc3b46b9dae1f114d;ds=sidebyside diff --git a/crypto/mem_dbg.c b/crypto/mem_dbg.c index d4d72f25c6..2b8cf73028 100644 --- a/crypto/mem_dbg.c +++ b/crypto/mem_dbg.c @@ -115,7 +115,7 @@ #include "internal/threads.h" #include #include -#include +#include "internal/bio.h" #include #ifndef OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE @@ -636,6 +636,12 @@ int CRYPTO_mem_leaks(BIO *b) { MEM_LEAK ml; + /* + * OPENSSL_cleanup() will free the ex_data locks so we can't have any + * ex_data hanging around + */ + bio_free_ex_data(b); + /* Ensure all resources are released */ OPENSSL_cleanup();