summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/kern/uipc_usrreq.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c
index 7474012..1a87d14 100644
--- a/sys/kern/uipc_usrreq.c
+++ b/sys/kern/uipc_usrreq.c
@@ -794,17 +794,17 @@ unp_connect(so, nam, td)
error = VOP_ACCESS(vp, VWRITE, td->td_ucred, td);
if (error)
goto bad;
+ mtx_unlock(&Giant);
+ UNP_LOCK();
so2 = vp->v_socket;
if (so2 == NULL) {
error = ECONNREFUSED;
- goto bad;
+ goto bad2;
}
if (so->so_type != so2->so_type) {
error = EPROTOTYPE;
- goto bad;
+ goto bad2;
}
- mtx_unlock(&Giant);
- UNP_LOCK();
if (so->so_proto->pr_flags & PR_CONNREQUIRED) {
if (so2->so_options & SO_ACCEPTCONN) {
/*
OpenPOWER on IntegriCloud