Fix logic which resulted in missing a call to INP_UNLOCK().

Submitted by:	jlemon, mux
This commit is contained in:
Jeffrey Hsu 2002-06-21 22:54:16 +00:00
parent d9adce40ed
commit 2ded288c88

View File

@ -615,12 +615,9 @@ udp_pcblist(SYSCTL_HANDLER_ARGS)
for (inp = LIST_FIRST(udbinfo.listhead), i = 0; inp && i < n;
inp = LIST_NEXT(inp, inp_list)) {
INP_LOCK(inp);
if (inp->inp_gencnt <= gencnt) {
if (cr_canseesocket(req->td->td_ucred,
inp->inp_socket))
continue;
if (inp->inp_gencnt <= gencnt &&
cr_canseesocket(req->td->td_ucred, inp->inp_socket) == 0)
inp_list[i++] = inp;
}
INP_UNLOCK(inp);
}
INP_INFO_RUNLOCK(&udbinfo);