cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Memory problem with Windows

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Wed, 1 Dec 2004 20:24:21 +0100 (CET)

On Wed, 1 Dec 2004, Gonzalo Diethelm wrote:

> ConnectionKillOne(SessionHandle * 0x00ab4250) line 1677 + 24 bytes
> Curl_close(SessionHandle * 0x00ab4250) line 206 + 9 bytes
> curl_easy_cleanup(void * 0x00ab4250) line 394 + 9 bytes
>
> Inside ConnectionKillOne() it dies when executing this line of code:
>
> for(i=0; i< data->state.numconnects; i++) {
>
> The data variable is corrupted, it doesn't show any good values at all.

When calling curl_easy_cleanup(), that line of code is the first one that uses
the data variable.

My guess is that your program is passing in a bad pointer to
curl_easy_cleanup(), or that your program has overwritten parts of the memory
that contains the curl handle struct.

>> in libcurl 7.12.2: none.
>
> How about any DLL-related problems?

I'm not aware of any such problems either.

> I just noticed the recommendation to use sqlite_freemem() instead of free()
> for any errors returned by SQLite; this is (I guess) related to allocating
> memory in one DLL (SQLite) and erasing it in another one.

Correct. That's why libcurl provides functions for apps to free memory that
was allocated by the library.

Are you saying you free() some data you get from libcurl?

-- 
      Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
       Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2004-12-01