cURL / Mailing Lists / curl-library / Single Mail

curl-library

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