add missing unlock when in_pcballoc returns an error

This commit is contained in:
Sam Leffler 2003-08-19 17:11:46 +00:00
parent 588523fae3
commit 53b57cd1ab

View File

@ -903,8 +903,10 @@ udp_attach(struct socket *so, int proto, struct thread *td)
s = splnet();
error = in_pcballoc(so, &udbinfo, td);
splx(s);
if (error)
if (error) {
INP_INFO_WUNLOCK(&udbinfo);
return error;
}
inp = (struct inpcb *)so->so_pcb;
INP_LOCK(inp);