summaryrefslogtreecommitdiff
path: root/lib/libfetch
diff options
context:
space:
mode:
authorMichael Gmelin <grembo@FreeBSD.org>2015-09-25 14:24:23 +0000
committerMichael Gmelin <grembo@FreeBSD.org>2015-09-25 14:24:23 +0000
commit034fb271ae8c691211125cf21d4d856190585276 (patch)
treee3a850a483598eaf9f7bc064528eee4ed94ddef4 /lib/libfetch
parentb2557db60788104f972beac87630bafeff3c7721 (diff)
Notes
Diffstat (limited to 'lib/libfetch')
-rw-r--r--lib/libfetch/common.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libfetch/common.c b/lib/libfetch/common.c
index 3095e06bfe02..ae8b79deb5af 100644
--- a/lib/libfetch/common.c
+++ b/lib/libfetch/common.c
@@ -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;
}