diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-10-03 10:52:12 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-10-03 10:52:12 +0000 |
commit | 91e049d131acb98a8b3ff54ab8f882b27b354479 (patch) | |
tree | 2ccb5b9450d014d6731c31bc458bcc57a8a15916 /sys/netnatm | |
parent | a2f23a0f4539991c8472613441751eead15267e9 (diff) |
MALLOC+bzero -> malloc+M_ZERO.
In ip_esp.c all allocated memory is now zero'd in the
"malloc(sizeof(*tc) + alen ..." case. The +alen memory was not
initialized by the bzero() call. Noticed by chl@.
"Looks good" art@ "seems ok" chl@
Diffstat (limited to 'sys/netnatm')
-rw-r--r-- | sys/netnatm/natm_pcb.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/netnatm/natm_pcb.c b/sys/netnatm/natm_pcb.c index 45d7c391266..e5f14669551 100644 --- a/sys/netnatm/natm_pcb.c +++ b/sys/netnatm/natm_pcb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: natm_pcb.c,v 1.7 2006/03/05 21:48:57 miod Exp $ */ +/* $OpenBSD: natm_pcb.c,v 1.8 2007/10/03 10:52:11 krw Exp $ */ /* * @@ -65,10 +65,9 @@ int wait; { struct natmpcb *npcb; - MALLOC(npcb, struct natmpcb *, sizeof(*npcb), M_PCB, wait); + npcb = malloc(sizeof(*npcb), M_PCB, wait | M_ZERO); if (npcb) { - bzero(npcb, sizeof(*npcb)); npcb->npcb_flags = NPCB_FREE; } return(npcb); |