cURL / Mailing Lists / curl-library / Single Mail


memory leak -

From: Phil Pellouchoud <>
Date: Wed, 20 Aug 2008 08:26:21 -0700

Didn't see this post make it through, so I'm trying again, apologies in
advance if it made it through but I missed it -

In ssluse.c there exists the following function:
/* Global cleanup */
void Curl_ossl_cleanup(void)
  /* Free the SSL error strings */
  /* EVP_cleanup() removes all ciphers and digests from the
     table. */
#ifdef HAVE_ENGINE_cleanup
  /* this function was not present in 0.9.6b, but was added sometimes
     later */
I noticed a memory leak after making an HTTPS call.  After some amount
of digging, I found that the last function CRYPTO_cleanup_all_ex_data()
was not getting called (i.e. it was effectively not compiled in).  If I
put a call to that after curl_global_cleanup(), I noticed that the
memory leak went away.  This lead me to believe that I should have had
HAVE_CRYPTO_CLEANUP_ALL_EX_DATA defined.  I searched for that constant
and only found it in config-tpf.h and config-symbian.h (which had it
commented out).  I'm guessing that should be defined in config-win32.h,
but I'd like some guidance here; like possibly if I'm doing something
wrong or doing it the wrong way...
p.s. I am using:
- curl-7.18.2
- openssl-0.9.8h
- zlib-1.2.3
Received on 2008-08-20