X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/de355530ae67247cbd0da700edb3a2a1dae884c2..cc9f6e38162d3c1bf6ca97536c2477f476c8e01b:/bsd/netat/ddp_usrreq.c diff --git a/bsd/netat/ddp_usrreq.c b/bsd/netat/ddp_usrreq.c index 7d327ab60..9331419cb 100644 --- a/bsd/netat/ddp_usrreq.c +++ b/bsd/netat/ddp_usrreq.c @@ -84,14 +84,17 @@ int ddp_pru_attach(struct socket *so, int proto, at_ddp_t *ddp = NULL; struct atpcb *pcb = (struct atpcb *)((so)->so_pcb); + error = soreserve(so, ddp_sendspace, ddp_recvspace); + if (error != 0) + return error; + s = splnet(); error = at_pcballoc(so, &ddp_head); splx(s); if (error) return error; - error = soreserve(so, ddp_sendspace, ddp_recvspace); pcb = (struct atpcb *)((so)->so_pcb); - pcb->pid = current_proc()->p_pid; + pcb->pid = proc_selfpid(); pcb->ddptype = (u_char) proto; /* set in socreate() */ pcb->proto = ATPROTO_DDP;