summaryrefslogtreecommitdiff
path: root/usr.sbin/memconfig
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/memconfig')
-rw-r--r--usr.sbin/memconfig/memconfig.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/memconfig/memconfig.c b/usr.sbin/memconfig/memconfig.c
index 27ac18c07de..12b6ebdea3e 100644
--- a/usr.sbin/memconfig/memconfig.c
+++ b/usr.sbin/memconfig/memconfig.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: memconfig.c,v 1.11 2006/03/14 19:23:16 moritz Exp $ */
+/* $OpenBSD: memconfig.c,v 1.12 2007/09/02 15:19:39 deraadt Exp $ */
/*-
* Copyright (c) 1999 Michael Smith <msmith@freebsd.org>
@@ -134,7 +134,7 @@ mrgetall(int memfd, int *nmr)
err(1, "can't size range descriptor array");
*nmr = mro.mo_arg[0];
- mrd = malloc(*nmr * sizeof(struct mem_range_desc));
+ mrd = calloc(*nmr, sizeof(struct mem_range_desc));
if (mrd == NULL)
errx(1, "can't allocate %zu bytes for %d range descriptors",
*nmr * sizeof(struct mem_range_desc), *nmr);