Don't forget to remember previous element at the end of the loop.
Reported by: brueffer Found with: Coverity Prevent(tm) CID: 1135301
This commit is contained in:
parent
18f169af92
commit
e51fc8f90d
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user