> Second one is more FYI. I've seen in the examples and the list archives
> that ERR_remove_state(0) should be called to clean up some stuff at the
> end. What I don't think anyone's mentioned is that it cleans up thread
> specific data only for the thread which calls it. I've found that I need to
> call it in multiple threads to do the job properly. I haven't fully
> investigated yet what creates this thread-specific stuff. I'm guessing most
> non-trivial calls into the library will do it.

You hit the nail on the head. I just found out myself that it 
has to be probably called by every thread that ever uses the SSL 
library, but wan't really sure if was right to do it. Earlier, just 
my main thread used to call ERR_remove_state(0) on exit and my 
application used to leak a bunch of (12, 332) bytes leak pairs. 
But with the call in every thread the leaks are taken care
of. 

Thanks,
Amit. 

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

Reply via email to