cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Should check for CURLE_COULDNT_RESOLVE_HOST

From: Bjorn Reese <breese_at_mail1.stofanet.dk>
Date: 14 Nov 2003 17:22:53 +0100

On Fri, 2003-11-14 at 12:55, Daniel Stenberg wrote:

> diff -u -r1.107 hostip.c
> --- hostip.c 28 Oct 2003 13:06:17 -0000 1.107
> +++ hostip.c 14 Nov 2003 11:53:37 -0000
> @@ -280,6 +280,7 @@
> ssize_t entry_len;
> int wait;
> struct SessionHandle *data = conn->data;
> + CURLcode result;
>
> /* default to failure */
> int rc = -1;
> @@ -327,7 +328,9 @@
> /* the response to our resolve call will come asynchronously at
> a later time, good or bad */
> /* First, check that we haven't received the info by now */
> - (void)Curl_is_resolved(conn, &dns);
> + result = Curl_is_resolved(conn, &dns);
> + if(result) /* error detected */
> + return -1;

This will cause a memory leaks of the addr struct.

-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
Received on 2003-11-14