cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Apparent memory leak deep in cURL library; requesting assistance

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 22 Feb 2011 22:45:54 +0100 (CET)

On Tue, 22 Feb 2011, Lars Nilsson wrote:

>> It is always that first 20 byte allocation that is getting leaked.
>
> Maybe you could create a test program along the lines of

> in_buffer = realloc(in_buffer, 122);
> in_buffer = realloc(in_buffer, 488);

... yes, I agree with Lars that it certainly looks like there's a MemScope
flaw here.

If that realloc() pointer really is leaked, then surely every HTTP request
libcurl ever does would leak? And then it would also leak on libcurl on linux
(as that realloc series is always done for HTTP) and we'd see the leak with
valgrind and our own internal memory leak system. And yet we don't.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2011-02-22