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
c3b6e24c0c
commit
558b866a3a
@ -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