summaryrefslogtreecommitdiffstats
path: root/sys/net
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2001-10-10 20:43:50 +0000
committerjhb <jhb@FreeBSD.org>2001-10-10 20:43:50 +0000
commita410ffa472b8eb78e1564fb2de137e2daf28dae2 (patch)
tree18d54d7ccbfd2890542a65a38e01ff57ad937a8a /sys/net
parent33c3770bff2aa5b67301c544f2ee3f522052d736 (diff)
downloadFreeBSD-src-a410ffa472b8eb78e1564fb2de137e2daf28dae2.zip
FreeBSD-src-a410ffa472b8eb78e1564fb2de137e2daf28dae2.tar.gz
Malloc mutexes pre-zero'd as random garbage (including 0xdeadcode) my
trigget the check to make sure we don't initalize a mutex twice.
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/bpf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/net/bpf.c b/sys/net/bpf.c
index 68e5308..90b4e28 100644
--- a/sys/net/bpf.c
+++ b/sys/net/bpf.c
@@ -1212,7 +1212,7 @@ bpfattach(ifp, dlt, hdrlen)
u_int dlt, hdrlen;
{
struct bpf_if *bp;
- bp = (struct bpf_if *)malloc(sizeof(*bp), M_BPF, M_NOWAIT);
+ bp = (struct bpf_if *)malloc(sizeof(*bp), M_BPF, M_NOWAIT | M_ZERO);
if (bp == 0)
panic("bpfattach");
OpenPOWER on IntegriCloud