Fix non-POSIX-compliant use of getaddrinfo in libfetch

Submitted by:	Boris Kolpackov <boris@codesynthesis.com>
Reviewed by:	bapt
Approved by:	bapt
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D3724
This commit is contained in:
Michael Gmelin 2015-09-25 14:24:23 +00:00
parent b2557db607
commit 034fb271ae
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=288217

View File

@ -495,7 +495,8 @@ fetch_ssl_get_numeric_addrinfo(const char *hostname, size_t len)
hints.ai_protocol = 0;
hints.ai_flags = AI_NUMERICHOST;
/* port is not relevant for this purpose */
getaddrinfo(host, "443", &hints, &res);
if (getaddrinfo(host, "443", &hints, &res) != 0)
res = NULL;
free(host);
return res;
}