> Arora Meenakshi wrote:
> 
> hello
> Please reply to this mail if anyone has any suggestions. i have posted
> this question a lot of times but no success so i am again giving it a
> try.
> 
> i am running my openssl code in bounds checker & i am getting the
> memory leaks in*CRYPTO_malloc(int num, const char *file, int line).
> 
> our product is in the release stage & we hae to somehow get rid of
> this memory leak soon  .
> 
> clean up functions i am calling are:
>         SSL_shutdown (...);
>         closesocket(...);
>         SSL_free (...);
>         SSL_CTX_free (..);
>         WSACleanup( );
>         EVP_cleanup();
>         ERR_remove_state(0);
>         ERR_free_strings();
>         OBJ_NAME_cleanup(-1);
> 
> & my sequence of openssl function is
> SSLeay_add_ssl_algorithms();
> RAND_screen();
> WSAStartup(versionRequested,&wsaData))
> SSLv2_client_method();
> SSL_CTX_new(...)
> socket(.........))
> ......
> connect(m_socketDescriptor,(struct
> sockaddr*)&m_sockAddr,sizeof(sockaddr)))
> m_pSSL = SSL_new(m_pSSLContext))
> SSL_connect(m_pSSL))
> ........
> 

There was an issue relating to the thread_hash table that was mentioned
in these lists a while ago. ERR_remove_state() would remove a thread's
entries from the table but not the table itself.

It is an issue with OpenSSL 0.9.5a and probably previous versions also,
however since the leak cannot grow it is not a very serious problem.

It is fixed in the latest development version.

If this is the case then you can try replacing the crypto/err.c file
with one from the latest snapshot, or if it wont compile just the
function ERR_remove_state().

Steve.
-- 
Dr Stephen N. Henson.   http://www.drh-consultancy.demon.co.uk/
Personal Email: [EMAIL PROTECTED] 
Senior crypto engineer, Celo Communications: http://www.celocom.com/
Core developer of the   OpenSSL project: http://www.openssl.org/
Business Email: [EMAIL PROTECTED] PGP key: via homepage.

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

Reply via email to