summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2007-10-03 10:52:12 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2007-10-03 10:52:12 +0000
commit91e049d131acb98a8b3ff54ab8f882b27b354479 (patch)
tree2ccb5b9450d014d6731c31bc458bcc57a8a15916 /sys/dev
parenta2f23a0f4539991c8472613441751eead15267e9 (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/dev')
-rw-r--r--sys/dev/ic/if_wi_hostap.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/dev/ic/if_wi_hostap.c b/sys/dev/ic/if_wi_hostap.c
index 79aea6b94be..29e6412bafd 100644
--- a/sys/dev/ic/if_wi_hostap.c
+++ b/sys/dev/ic/if_wi_hostap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_wi_hostap.c,v 1.37 2006/11/26 19:46:28 deraadt Exp $ */
+/* $OpenBSD: if_wi_hostap.c,v 1.38 2007/10/03 10:52:11 krw Exp $ */
/*
* Copyright (c) 2002
@@ -461,13 +461,10 @@ wihap_sta_alloc(struct wi_softc *sc, u_int8_t *addr)
int i, hash = sta_hash_func(addr);
/* Allocate structure. */
- MALLOC(sta, struct wihap_sta_info *, sizeof(struct wihap_sta_info),
- M_DEVBUF, M_NOWAIT);
+ sta = malloc(sizeof(*sta), M_DEVBUF, M_NOWAIT | M_ZERO);
if (sta == NULL)
return (NULL);
- bzero(sta, sizeof(struct wihap_sta_info));
-
/* Allocate an ASID. */
i=hash<<4;
while (whi->asid_inuse_mask[i >> 4] & (1UL << (i & 0xf)))