diff options
Diffstat (limited to 'lib/hostip4.c')
-rw-r--r-- | lib/hostip4.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/hostip4.c b/lib/hostip4.c index cbb00ab2d..08565cd86 100644 --- a/lib/hostip4.c +++ b/lib/hostip4.c @@ -348,7 +348,7 @@ Curl_addrinfo *Curl_he2ai(const struct hostent *he, int port) /* no input == no output! */ return NULL; - for(i=0; (curr = (struct in_addr *)he->h_addr_list[i]); i++) { + for(i=0; (curr = (struct in_addr *)he->h_addr_list[i]) != NULL; i++) { ai = calloc(1, sizeof(Curl_addrinfo) + sizeof(struct sockaddr_in)); |