Stanislav Mikhailenko wrote:
    CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON);
    SSLeay_add_ssl_algorithms();
    SSL_load_error_strings();
    ERR_remove_state(0);
    ERR_free_strings();
    EVP_cleanup();
    CRYPTO_cleanup_all_ex_data();
    ENGINE_cleanup();
    CONF_modules_unload(1);

This code makes leaks about hundred of bytes. It is only in this version or older versions makes this too? or i did something wrong?



How are you seeing these leaks ? Are you using CRYPTO_mem_xxxxx() for that ?


With the same testcase on linux there are 6 leaked blocks.


2 of them related to zlib and the lack of cleanup for the
ssl/ssl_ciph.c:144 with the "ssl_comp_methods" variable holding a stack of "SSL_COMP *" then there is also the "SSL_COMP *" allocated for zlib.

I have created a patch which can deal with the above leak.

Do you have a ZLIB support enabled on Win32 ? Are you using a DLL for static version of ZLIB1.DLL ?


4 of them relate to the CRYPTO_mem_xxxxx() leak checking functionality. the LHASH from crypto/mem_dbg.c:84 with the "mh" variable and also line 107 with the "amih" variable.

If you remove the line: CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON); on linux 4 of the block are no longer leaked.


Darryl
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to