summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/config/util.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/config/util.c b/usr.sbin/config/util.c
index 9bd15a81b12..a571697a0e0 100644
--- a/usr.sbin/config/util.c
+++ b/usr.sbin/config/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.14 2014/05/18 09:29:54 espie Exp $ */
+/* $OpenBSD: util.c,v 1.15 2014/05/29 16:38:23 tedu Exp $ */
/* $NetBSD: util.c,v 1.5 1996/08/31 20:58:29 mycroft Exp $ */
/*
@@ -62,9 +62,8 @@ emalloc(size_t size)
{
void *p;
- if ((p = malloc(size)) == NULL)
+ if ((p = calloc(1, size)) == NULL)
nomem();
- memset(p, 0, size);
return (p);
}