diff options
author | hsu <hsu@FreeBSD.org> | 2002-06-21 22:54:16 +0000 |
---|---|---|
committer | hsu <hsu@FreeBSD.org> | 2002-06-21 22:54:16 +0000 |
commit | 3710c0eed03d018ea0d504d1adb7e66ad0926466 (patch) | |
tree | fbfbe75c221dadbb479af4f478234ff6407a5e2c /sys/netinet/udp_usrreq.c | |
parent | fd6a0fada4a75405cf44629e9fa136d72f2e0f67 (diff) | |
download | FreeBSD-src-3710c0eed03d018ea0d504d1adb7e66ad0926466.zip FreeBSD-src-3710c0eed03d018ea0d504d1adb7e66ad0926466.tar.gz |
Fix logic which resulted in missing a call to INP_UNLOCK().
Submitted by: jlemon, mux
Diffstat (limited to 'sys/netinet/udp_usrreq.c')
-rw-r--r-- | sys/netinet/udp_usrreq.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index df18c9a..31fb251 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -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); |