cURL / Mailing Lists / curl-library / Single Mail


fail to `malloc` pointers after a call to curl_easy_perform.

From: ataro <>
Date: Thu, 14 Jan 2016 13:47:06 -0500

Hi there,

I'm developing a GUI app on Microsoft Windows to make HTTP requests with libcurl.

Because this is a GUI app, I need to initialize the curl easy handle from a separate thread in order to avoid the main window procedure from being blocked until curl_easy_perform return.

The problem is that in order to do the HTTP requests I do some `malloc` calls to store in the memory some string which I use them in the HTTP request.
The strange thing is that after I make a call to curl_easy_perform function, all my calls to the `free` CRT function are failed with the return code 9 which according to is an error of "Bad File Number". In contrast, all the calls to the `free` function before the call to curl_easy_perform are returned with the code 0 which means that the free function successfully freed the memory.

I didn't find any clue to this strange behavior. can you help me please?



List admin:
Received on 2016-01-14