AF_UNIX: Don't unlock unp/unp2 if they're not locked

Reported by:	mjg
This commit is contained in:
Matt Macy 2018-05-20 21:20:26 +00:00
parent b15253bba0
commit cb8f450b94
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=333941

View File

@ -1568,7 +1568,7 @@ unp_connectat(int fd, struct socket *so, struct sockaddr *nam,
so2 = NULL;
if (so2 == NULL) {
error = ECONNREFUSED;
goto bad3;
goto bad2;
}
unp3 = sotounpcb(so2);
unp_pcb_lock2(unp2, unp3);