cURL / Mailing Lists / curl-library / Single Mail


Re: curl exception with bad url

From: Daniel Stenberg <>
Date: Tue, 23 Aug 2011 17:11:07 +0200 (CEST)

On Tue, 23 Aug 2011, Robert Navarro wrote:

> static size_t WriteMemoryCallback(void *ptr, size_t size, size_t
> nmemb, void *data)
> {
> size_t realsize = size * nmemb;
> struct MemoryStruct *mem = (struct MemoryStruct *)data;
> mem->memory = new char[mem->size + realsize + 1];

This function leaks all the memory you allocated in the previous call...

> Sorry for the confusion! When I say stop, I mean the windows service is
> suddenly in the stopped state. There is no entry in the Event Viewer log to
> indicate something happened.

Can I suggest that when you debug your application, you just run it "normally"
or with a debugger or something to properly figure out what happens!

> So I guess the question is, why do I not get a timeout response with the
> second path, when the same code gives it to me with the first?

I don't know. My guess is that your application/callback somehow causes the
problems, as quite a lot of people successfully use libcurl and we test it
quite extensively all the time and we have never had this problem reported.

If you can make a full source code that reproduces the example and show us
that source it would be very interesting.

List admin:
Received on 2011-08-23