cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Should check for CURLE_COULDNT_RESOLVE_HOST

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Sat, 15 Nov 2003 10:52:21 +0100 (CET)

On Fri, 14 Nov 2003, Bjorn Reese wrote:

> > + result = Curl_is_resolved(conn, &dns);
> > + if(result) /* error detected */
> > + return -1;
>
> This will cause a memory leaks of the addr struct.

I don't see how that will happen, as this function call and possible return
-1, is only made if addr is NULL (and wait is TRUE, indicating that we are
awating an asynchronous name lookup to finish).

OTOH, I think it leaks the ares handle...

-- 
    Daniel Stenberg -- http://curl.haxx.se/ -- http://daniel.haxx.se/
 [[ Do not post private mails to this email address. They won't reach me. ]]
-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
Received on 2003-11-15