Calling Err_remove_state(0) before the thread exits fixed it :) --- Calista <[EMAIL PROTECTED]> wrote:
> Hi, > > if(!(x509 = d2i_X509_fp(fpin, NULL))) { > fseek(fpin, 0, SEEK_SET); > x509=PEM_read_X509(fpin, NULL, NULL, NULL); > } > > CRYPTO_MDEBUG's output is: > [09:36:15] 1661 file=lhash.c, line=193, thread=121, > number=96, address=302DB948 > > I caught the address in the debugger and it is > coming > from d2i_X509_fp. > > I understand that d2i_X509_fp allocates memory. But > the file contains certificate in PEM format. So x509 > is NULL and the code proceeds to PEM_read_X509 which > I > free later with X509_free(). But the address leaked > in > d2i_X509_fp .. how can I free it? Why is it > allocating > memory if it returns x509? Finally the thread exists > .. cleaning.. and then I create it again.. but it > leaks memory again. > > Thank you. > Calista. > > > > > __________________________________ > Yahoo! FareChase: Search multiple travel sites in > one click. > http://farechase.yahoo.com > ______________________________________________________________________ > OpenSSL Project > http://www.openssl.org > User Support Mailing List > openssl-users@openssl.org > Automated List Manager > [EMAIL PROTECTED] > __________________________________ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]