aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2003-11-14 11:56:15 +0000
committerDaniel Stenberg <daniel@haxx.se>2003-11-14 11:56:15 +0000
commita701f3dddf5695f15a833ca7fbc75fa5bd6818f1 (patch)
treec061bc438bc82a960ddab7860612865ed7f65f32
parentf99a1d4e82731600cf787262476187b1d2f11008 (diff)
Siddhartha Prakash Jain found a case with a bad resolve that we didn't
properly bail out from, when using ares.
-rw-r--r--lib/hostip.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/hostip.c b/lib/hostip.c
index 5a7ef2a4c..5f2a46e7a 100644
--- a/lib/hostip.c
+++ b/lib/hostip.c
@@ -280,6 +280,7 @@ int Curl_resolv(struct connectdata *conn,
ssize_t entry_len;
int wait;
struct SessionHandle *data = conn->data;
+ CURLcode result;
/* default to failure */
int rc = -1;
@@ -327,7 +328,9 @@ int Curl_resolv(struct connectdata *conn,
/* 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;
if(dns)
rc = 0; /* pointer provided */
else