diff options
Diffstat (limited to 'sys/netnatm/natm_pcb.c')
-rw-r--r-- | sys/netnatm/natm_pcb.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/netnatm/natm_pcb.c b/sys/netnatm/natm_pcb.c index 2ce9a30..46bcb7c 100644 --- a/sys/netnatm/natm_pcb.c +++ b/sys/netnatm/natm_pcb.c @@ -63,16 +63,15 @@ int wait; { struct natmpcb *npcb; - MALLOC(npcb, struct natmpcb *, sizeof(*npcb), M_PCB, wait); + MALLOC(npcb, struct natmpcb *, sizeof(*npcb), M_PCB, wait | M_ZERO); #ifdef DIAGNOSTIC if (wait == M_WAITOK && npcb == NULL) panic("npcb_alloc: malloc didn't wait"); #endif - if (npcb) { - bzero(npcb, sizeof(*npcb)); + if (npcb) npcb->npcb_flags = NPCB_FREE; - } + return(npcb); } |