summaryrefslogtreecommitdiffstats
path: root/sys/netinet/udp_usrreq.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet/udp_usrreq.c')
-rw-r--r--sys/netinet/udp_usrreq.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c
index 31fb251..56bb1e1 100644
--- a/sys/netinet/udp_usrreq.c
+++ b/sys/netinet/udp_usrreq.c
@@ -689,10 +689,11 @@ udp_getcred(SYSCTL_HANDLER_ARGS)
if (error)
goto out;
cru2x(inp->inp_socket->so_cred, &xuc);
- error = SYSCTL_OUT(req, &xuc, sizeof(struct xucred));
out:
INP_INFO_RUNLOCK(&udbinfo);
splx(s);
+ if (error == 0)
+ error = SYSCTL_OUT(req, &xuc, sizeof(struct xucred));
return (error);
}
OpenPOWER on IntegriCloud