diff options
Diffstat (limited to 'sys/netinet/tcp_subr.c')
-rw-r--r-- | sys/netinet/tcp_subr.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 5b2dfd0..07deac9 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.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) |