Re: OpenSSL Error Handling

2010-05-29 Thread Pankaj Aggarwal
Thanks David, #4 seems to be the simplest solution to me. while trying #4, I get exception on windows platform. Usually the excpetion occurs in ERR_clear_error while allocating memory. I call ERR_remove_state() at end of library functions. With single thread it works find. But as soon as I increas

RE: OpenSSL Error Handling

2010-05-29 Thread David Schwartz
Pankaj Aggarwal wrote: > I am able to think about the following approaches :   > 1. Keep a record a threads which are spawned.   > 2. Expose a function from our library for cleanup when the thread exits  > Is there any other way to avoid the memory leak caused by error queues ? There are severa

OpenSSL Error Handling

2010-05-26 Thread Pankaj Aggarwal
Hi, Our library uses OpenSSL(v 0.9.8k) in multithreaded environment. Recently I observed memory leak resulting from not calling ERR_remove_state(). After reading the documentation of this function, I see that ERR_remove_state should be called when a thread exits. Since we are using OpenSSL within