mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-07 00:50:50 +00:00
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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=265145
|
@ -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 a new issue