cURL / Mailing Lists / curl-library / Single Mail


Re: Proposed fix for OpenSSL memory leaks.

From: Daniel Stenberg <>
Date: Thu, 10 May 2012 13:10:02 +0200 (CEST)

On Thu, 10 May 2012, Mischa Salle wrote:

> The real problem emerges if you use both curl+openssl *and* openssl
> directly, then you can just hope that the cleanup functions put the pointers
> to NULL to prevent double free()'s...

I believe this is generally safe with modern OpenSSL versions.

> Concerning the init: in principle the curl_global_init is called
> automatically by the curl_easy_init if you don't do it explicitly (if I'm
> not mistaken).

That is correct. But as curl_global_init() isn't thread safe etc, letting your
program depend on the "automatic" init might not be the wisest idea.

List admin:
Received on 2012-05-10