aboutsummaryrefslogtreecommitdiff
path: root/lib/socks.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/socks.c')
-rw-r--r--lib/socks.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/socks.c b/lib/socks.c
index eb7956798..df301ecec 100644
--- a/lib/socks.c
+++ b/lib/socks.c
@@ -172,8 +172,8 @@ CURLcode Curl_SOCKS4(const char *proxy_name,
return CURLE_COULDNT_RESOLVE_PROXY;
if(rc == CURLRESOLV_PENDING)
- /* this requires that we're in "wait for resolve" state */
- rc = Curl_wait_for_resolv(conn, &dns);
+ /* ignores the return code, but 'dns' remains NULL on failure */
+ (void)Curl_wait_for_resolv(conn, &dns);
/*
* We cannot use 'hostent' as a struct that Curl_resolv() returns. It
@@ -597,9 +597,12 @@ CURLcode Curl_SOCKS5(const char *proxy_name,
if(rc == CURLRESOLV_ERROR)
return CURLE_COULDNT_RESOLVE_HOST;
- if(rc == CURLRESOLV_PENDING)
+ if(rc == CURLRESOLV_PENDING) {
/* this requires that we're in "wait for resolve" state */
rc = Curl_wait_for_resolv(conn, &dns);
+ if(rc)
+ return rc;
+ }
/*
* We cannot use 'hostent' as a struct that Curl_resolv() returns. It