cURL / Mailing Lists / curl-library / Single Mail


Re: Proposed fix for OpenSSL memory leaks.

From: JonathonS <>
Date: Wed, 9 May 2012 19:14:47 -0700

Hi guys,

So I found out that my program was leaking memory because I was
invoking curl_global_init, curl_global_cleanup, curl_easy_init and
curl_easy_cleanup on separate threads. This was causing a leak in SSL
(when curl_ssl_init was called).

To confirm my theory that initialization/uninitialization functions
must be invoked on the same thread, I looked through the libcurl docs
but I couldn't find any mention of this. I did however find some
mention of thread-safety.

Can someone point me to the docs where it describes the behavior
mentioned above please? thanks!


On Mon, Apr 16, 2012 at 11:03 AM, Daniel Stenberg <> wrote:
> On Mon, 16 Apr 2012, JonathonS wrote:
>> Just out of curiosity, has this issue been resolved? :)
> No. As you can see nobody ever responded to my critique of the patch and
> nobody provided any updates to it, and I'm backlogged half way to the moon
> so I've not been able to do it myself yet.
>> I am currently statically linking on Windows to libcurl version 7.24.0 and
>> statically linking to OpenSSL 1.0.0g.  My debugger is reporting a lot of
>> memory leaks which looks like it could be the same issue.
> Looks like or actually is?
> We get that "it leaks memory" report very often and it very rarely turns out
> to be true.
> --
>  /
> -------------------------------------------------------------------
> List admin:
> Etiquette:

List admin:
Received on 2012-05-10