diff --git a/lib/libcapsicum/libcapsicum_dns.c b/lib/libcapsicum/libcapsicum_dns.c index 170e0d07d2d9..113f8dc5a315 100644 --- a/lib/libcapsicum/libcapsicum_dns.c +++ b/lib/libcapsicum/libcapsicum_dns.c @@ -247,6 +247,7 @@ cap_getaddrinfo(cap_channel_t *chan, const char *hostname, const char *servname, prevai->ai_next = curai; else if (firstai == NULL) firstai = curai; + prevai = curai; } nvlist_destroy(nvl); if (curai == NULL && nvlai != NULL) {