summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/kern/kern_lock.c2
-rw-r--r--sys/kern/subr_rman.c2
-rw-r--r--sys/net/bpf.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c
index a2835c3..351643e 100644
--- a/sys/kern/kern_lock.c
+++ b/sys/kern/kern_lock.c
@@ -102,7 +102,7 @@ lockmgr_init(void *dummy __unused)
}
lock_mtx_array = (struct mtx *)malloc(sizeof(struct mtx) * lock_nmtx,
- M_CACHE, M_WAITOK);
+ M_CACHE, M_WAITOK | M_ZERO);
for (i = 0; i < lock_nmtx; i++)
mtx_init(&lock_mtx_array[i], "lockmgr interlock", MTX_DEF);
}
diff --git a/sys/kern/subr_rman.c b/sys/kern/subr_rman.c
index f9941da..1fbafd3 100644
--- a/sys/kern/subr_rman.c
+++ b/sys/kern/subr_rman.c
@@ -99,7 +99,7 @@ rman_init(struct rman *rm)
panic("implement RMAN_GAUGE");
TAILQ_INIT(&rm->rm_list);
- rm->rm_mtx = malloc(sizeof *rm->rm_mtx, M_RMAN, M_NOWAIT);
+ rm->rm_mtx = malloc(sizeof *rm->rm_mtx, M_RMAN, M_NOWAIT | M_ZERO);
if (rm->rm_mtx == 0)
return ENOMEM;
mtx_init(rm->rm_mtx, "rman", MTX_DEF);
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