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: Lars Nilsson <chamaeleon_at_gmail.com>
Date: Mon, 11 Oct 2010 14:20:13 -0400

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