mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -05:00
Curl_getaddrinfo_ex: sanitize function results follow-up.
This commit is contained in:
parent
6fe18add71
commit
1d75d30816
@ -208,6 +208,18 @@ Curl_getaddrinfo_ex(const char *nodename,
|
|||||||
Curl_freeaddrinfo(cafirst);
|
Curl_freeaddrinfo(cafirst);
|
||||||
cafirst = NULL;
|
cafirst = NULL;
|
||||||
}
|
}
|
||||||
|
else if(!cafirst) {
|
||||||
|
#ifdef EAI_NONAME
|
||||||
|
/* rfc3493 conformant */
|
||||||
|
error = EAI_NONAME;
|
||||||
|
#else
|
||||||
|
/* rfc3493 obsoleted */
|
||||||
|
error = EAI_NODATA;
|
||||||
|
#endif
|
||||||
|
#ifdef USE_WINSOCK
|
||||||
|
SET_SOCKERRNO(error);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
*result = cafirst;
|
*result = cafirst;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user