cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Memory leak in libcurl

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Mon, 22 Dec 2008 16:13:05 -0800

On Mon, Dec 22, 2008 at 02:26:18PM -0800, Huzaifa Al Nahas wrote:
> Correction to a typo in the previous post (after -> before):
>
> 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 before 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.

Since this memory appears to be allocated before main() is even called and
since this is a perfectly valid type of initialization for DLLs, I would
imagine there is a function alongside _CrtDumpMemoryLeaks() that "resets"
the leak counter that you can call at the start of your main() (after
OpenSSL's allocations). If so, that's probably the most elegant way to
solve the problem.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2008-12-23