cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: memlimit fail

From: Gisle Vanem <giva_at_bgnett.no>
Date: Mon, 07 Feb 2005 14:52:56 +0100

>> Looks like a case of double freeing. If I remove the above freedirs(), it
>> crashes inside hostip.c. Will dig some more.
>
> Ouch. Please do dig more. I'm personally pretty sucked up in my extensive ftp
> rewrite.

Trying the same with C-ares, everything seems okay. The problems is with
malloc failing in the Curl_addrinfo?_callback, but 'rc' isn't conveyed back to main
thread. I suggest these functions should return a CURLcode.

The crash is in Curl_resolv_unlock():
  curlassert(dns && (dns->inuse>0));

(dns == 0x13131313). Since the connection was disconnected in Curl_wait_for_resolv(),
Curl_done() should not touch the dns_entry. But I fail to see how this could get
double-freed.

--gv
Received on 2005-02-07