cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

Re: How do I free the memory used by an in-memory, non-formdata post request? (HeapValidate exception)

From: Ola Mork <ola_at_agoragames.com>
Date: Mon, 11 Oct 2010 14:47:44 -0400

No, I did it wrong there.

I replaced it with a memcpy but the question still stands.

- Ola

On Mon, Oct 11, 2010 at 2:20 PM, Lars Nilsson <chamaeleon_at_gmail.com> wrote:
> On Mon, Oct 11, 2010 at 2:09 PM, Ola Mork <ola_at_agoragames.com> wrote:
>> _request.size = body_buffer.tellp();
>> _request.memory = (char *)REALLOC(_request.memory, _request.size + 1);
>>
>> _request.memory = body_buffer.str();
>
> Did you mean to overwrite the result of realloc() with whatever str() returns?
>
> Lars Nilsson
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-10-11

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET