summaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
Diffstat (limited to 'base')
-rw-r--r--base/memory/zalloc.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/base/memory/zalloc.h b/base/memory/zalloc.h
index d2ef827d6..4f6df542f 100644
--- a/base/memory/zalloc.h
+++ b/base/memory/zalloc.h
@@ -20,10 +20,7 @@
static inline void *zalloc(size_t len)
{
- void *ptr = malloc(len);
- if (ptr)
- memset(ptr, 0, len);
- return ptr;
+ return calloc(1, len);
}
//----------------------------------------------------------------