cURL / Mailing Lists / curl-library / Single Mail


Re: Memory leak in libcurl

From: Huzaifa Al Nahas <>
Date: Tue, 6 Jan 2009 15:32:31 -0800

My previous post was hypothetical. To make myself clear, I was
suggesting that if there is a global cleanup function for libcrypto,
then calling it in the global curl cleanup functions could be a good
fix to this memory leak. I will check with the open_ssl support to see
if such a function exists.

PS: I am replying to the emails. Does that lead to top posts?

- Huzaifa

On Tue, Jan 6, 2009 at 2:12 PM, Daniel Stenberg <> wrote:
> On Tue, 6 Jan 2009, Huzaifa Al Nahas wrote:
> Please don't top-post, it makes this thread really hard to follow.
>> According to the output from Valgrind, it is in ENGINE_new (in
>> /usr/lib/ Is there any cleaning of libcrypto
>> initializations that is done in the curl cleanup functions?
> lib/ssluse.c:Curl_ossl_cleanup() does a range of (global) cleanups.
>> It looks that as a libcurl developer you will have the same issue if you
>> try to fix it.
> The same issue as what?
>> It appears that you won't be able to access this ENGINE pointer and thus
>> the ENGINE_free won't fit as a solution. Instead we would need a generic
>> libcrypto or openssh cleanup function that frees this ENGINE.
> I don't follow you. Are you suggesting there's a generic cleanup function in
> OpenSSL we're not using that is cause of this leak?
> The docs for OpenSSL is lacking (to put it friendly). I simply have no idea
> if there's any such missing function or not.
> --
> /
Received on 2009-01-07