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(); s = splnet();
error = in_pcballoc(so, &udbinfo, td); error = in_pcballoc(so, &udbinfo, td);
splx(s); splx(s);
if (error) if (error) {
INP_INFO_WUNLOCK(&udbinfo);
return error; return error;
}
inp = (struct inpcb *)so->so_pcb; inp = (struct inpcb *)so->so_pcb;
INP_LOCK(inp); INP_LOCK(inp);