[EMAIL PROTECTED]:

>  VC6.0 detected memory leaks in the following code! And the code do only 
>PEM_read_bio_PrivateKey()!!
> 
> When I enabled the OpenSSL_add_ssl_algorithms() and the PEM_read_bio_PrivateKey
> () finished sucessful, there is no memory leaks.
> But when I disable(comment out) the Openssl_add_ssl_algorithms() and the 
> PEM_read_bio_PrivateKey() failed, the following code caused memory leaks.
[...]
> Anyone have an idea?

Did you try OpenSSL's memory leak checking?  (See, for example, ssltest.c
for how to use it; a list of leaks found by OpenSSL will be output to a BIO.)

You should free your OpenSSL objects (pKey, in) *before* freeing
the library-internal stuff (EVP_cleanup() etc.), I don't know
if it makes a difference in this specific case though.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to