diff options
| author | Don Lewis <truckman@FreeBSD.org> | 2002-07-11 23:13:31 +0000 |
|---|---|---|
| committer | Don Lewis <truckman@FreeBSD.org> | 2002-07-11 23:13:31 +0000 |
| commit | 142b2bd644f86d87e84b467413c503fed3f4bb5a (patch) | |
| tree | 90b462359be64f48376c465a963917f73f556eb6 /sys/netinet/tcp_timewait.c | |
| parent | 4f6799e61eb12a5b20b9731fd4b80a34a83f2d95 (diff) | |
Notes
Diffstat (limited to 'sys/netinet/tcp_timewait.c')
| -rw-r--r-- | sys/netinet/tcp_timewait.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/sys/netinet/tcp_timewait.c b/sys/netinet/tcp_timewait.c index 5b2dfd016417..07deac9a5198 100644 --- a/sys/netinet/tcp_timewait.c +++ b/sys/netinet/tcp_timewait.c @@ -931,14 +931,12 @@ tcp_getcred(SYSCTL_HANDLER_ARGS) if (inp == NULL) { error = ENOENT; goto outunlocked; - } else { - INP_LOCK(inp); - if (inp->inp_socket == NULL) { - error = ENOENT; - goto out; - } } - + INP_LOCK(inp); + if (inp->inp_socket == NULL) { + error = ENOENT; + goto out; + } error = cr_canseesocket(req->td->td_ucred, inp->inp_socket); if (error) goto out; @@ -994,12 +992,11 @@ tcp6_getcred(SYSCTL_HANDLER_ARGS) if (inp == NULL) { error = ENOENT; goto outunlocked; - } else { - INP_LOCK(inp); - if (inp->inp_socket == NULL) { - error = ENOENT; - goto out; - } + } + INP_LOCK(inp); + if (inp->inp_socket == NULL) { + error = ENOENT; + goto out; } error = cr_canseesocket(req->td->td_ucred, inp->inp_socket); if (error) |
