summaryrefslogtreecommitdiffstats
path: root/sys/net/pfkey.c
diff options
context:
space:
mode:
authorhshoexer <hshoexer@openbsd.org>2007-09-13 21:00:14 +0000
committerhshoexer <hshoexer@openbsd.org>2007-09-13 21:00:14 +0000
commit2d77548fb79506dc094270ac6c75d8918a30c889 (patch)
tree34cc96999745031cccaf1848293e7c7e8987af81 /sys/net/pfkey.c
parentMALLOC/FREE -> malloc/free and M_ZERO changes (diff)
downloadwireguard-openbsd-2d77548fb79506dc094270ac6c75d8918a30c889.tar.xz
wireguard-openbsd-2d77548fb79506dc094270ac6c75d8918a30c889.zip
Convert MALLOC/FREE to malloc/free and use M_ZERO where applicable.
ok krw@
Diffstat (limited to 'sys/net/pfkey.c')
-rw-r--r--sys/net/pfkey.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/net/pfkey.c b/sys/net/pfkey.c
index a6dcf60db03..7b6f92a8792 100644
--- a/sys/net/pfkey.c
+++ b/sys/net/pfkey.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfkey.c,v 1.16 2004/11/26 18:02:22 markus Exp $ */
+/* $OpenBSD: pfkey.c,v 1.17 2007/09/13 21:00:14 hshoexer Exp $ */
/*
* @(#)COPYRIGHT 1.1 (NRL) 17 January 1995
@@ -201,9 +201,8 @@ pfkey_attach(struct socket *socket, struct mbuf *proto)
int s;
if (!(socket->so_pcb = malloc(sizeof(struct rawcb),
- M_PCB, M_DONTWAIT)))
+ M_PCB, M_DONTWAIT | M_ZERO)))
return (ENOMEM);
- bzero(socket->so_pcb, sizeof(struct rawcb));
s = splnet();
rval = raw_usrreq(socket, PRU_ATTACH, NULL, proto, NULL);