summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'util.c')
-rw-r--r--util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util.c b/util.c
index 1f836d9..f6494db 100644
--- a/util.c
+++ b/util.c
@@ -27,7 +27,7 @@ xmalloc(size_t size)
if (size == 0)
fatal("xmalloc: zero size");
- ptr = malloc(size);
+ ptr = calloc(1, size);
if (ptr == NULL)
fatal("xmalloc: out of memory (allocating %zu bytes)", size);
return ptr;
generated by cgit on OpenBSD