On Fri, Jul 30, 2004, Jim Schneider wrote:

> This seems to be a rather fruitful perennial on this mailing list.  Do we have 
> a FAQ we can add this one to?
> 
> The general consensus seems to be:  Before you ask about a memory leak in the 
> OpenSSL libraries, try doing your complete cycle of operations twice, and 
> seeing if you've "leaked" the same amount of memory in both cases.  If you 
> have, then the memory didn't really "leak", did it?
> 
> The components of OpenSSL allocate chunks of memory when they are first 
> initialized that are retained for the life of the process.  These chunks 
> aren't "leaked", since they do get reused.
> 

There should be an FAQ and it should also list various cleanup functions which
can be called to make most of the "leaks" go away.

In this case I suspect that CRYPTO_cleanup_all_ex_data() should be called
because calling RSA_new() will allocate an internal ex_data table.

Steve.
--
Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage
OpenSSL project core developer and freelance consultant.
Funding needed! Details on homepage.
Homepage: http://www.drh-consultancy.demon.co.uk
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to