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/netatalk/ddp_usrreq.c | |
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/netatalk/ddp_usrreq.c')
-rw-r--r-- | sys/netatalk/ddp_usrreq.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/netatalk/ddp_usrreq.c b/sys/netatalk/ddp_usrreq.c index 039666adffc..284e03e9df4 100644 --- a/sys/netatalk/ddp_usrreq.c +++ b/sys/netatalk/ddp_usrreq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ddp_usrreq.c,v 1.8 2007/05/26 12:09:40 claudio Exp $ */ +/* $OpenBSD: ddp_usrreq.c,v 1.9 2007/10/03 10:52:11 krw Exp $ */ /* * Copyright (c) 1990,1994 Regents of The University of Michigan. @@ -469,11 +469,10 @@ at_pcballoc( so ) { struct ddpcb *ddp; - MALLOC( ddp, struct ddpcb *, sizeof( *ddp ), M_PCB, M_NOWAIT ); + ddp = malloc(sizeof(*ddp), M_PCB, M_NOWAIT | M_ZERO); if ( ddp == NULL ) { return (ENOBUFS); } - bzero( ddp, sizeof( *ddp )); ddp->ddp_lsat.sat_port = ATADDR_ANYPORT; |