cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Memory leak in libcurl

From: Huzaifa Al Nahas <halnahas_at_gmail.com>
Date: Mon, 22 Dec 2008 14:19:25 -0800

Harmful is probably a strong word as you suggest. Problematic may be a
better word to describe it. Beyond the ability of reusing this "lost"
memory after the application closes, the main issue is that test cases
for memory leak will fail (I regard success as no memory leak reported
by _CrtDumpMemoryLeaks()) because of this insignificant memory leak.
That is the main reason I am looking for a function that frees this
memory.

On Mon, Dec 22, 2008 at 1:56 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:
> On Mon, 22 Dec 2008, Huzaifa Al Nahas wrote:
>
>> The memory leak reported by VC++ _CrtDumpMemoryLeaks() is probably
>> due to the same issue because it only occurs when curl is built with
>> OPENSSL support. Although the memory leak is not significantly harmful
>> as it does not grow
>
> If the memory doesn't grow, how is it harmful in _any_ way? I'm convinced
> OpenSSL needs the memory it allocates so it has to be used at some point.
> The only thing you miss with this leak is the ability to free (and thus
> re-use) that memory before your application exists. Calling that "harmful"
> feels like a strong word to me considering the amount of memory is only a
> few kilobytes.
>
> But I fully agree that the fault for this is OpenSSL's hands.
>
> --
>
> / daniel.haxx.se
>
Received on 2008-12-22