Sorry I forgot the OpenSSL version. It is OpenSSL 1.0.0.0a.
Thanks again, Jack ------------------------------------------------------------------------ ---------------------------- Hi Steve, Although this thread is from long time ago (http://marc.info/?l=openssl-dev&m=103036044506264&w=2), I still want see if I am lucky - hope you are still there with OpenSSL. Here is my code: CRYPTO_set_mem_debug_functions(MallocDebug, ReAllocDebug, FreeDebug, NULL, NULL); PKCS12* p12(::d2i_PKCS12_bio(pIn, NULL)); PKCS12_free(p12); CRYPTO_cleanup_all_ex_data(); ERR_remove_state(0); (Here MallocDebug, ReAllocDebug and FreeDebug are my functions that help me to see where the mem leaks are). Then I can see a memory leak like this: .\crypto\asn1\a_int.c: line 199 Do you have advices on how to bypass this leak? Thanks in advance, Jack