ref: 4a4a54644078f34ce0f9c86a01ec1159579afb48
parent: 9d48deb89985d6e88895fe6596850f9287da35b8
author: Jean-Marc Valin <[email protected]>
date: Mon Aug 29 09:48:58 EDT 2011
Using malloc() rather than calloc() as generic allocator
--- a/libcelt/os_support.h
+++ b/libcelt/os_support.h
@@ -47,7 +47,7 @@
/* WARNING: this is not equivalent to malloc(). If you want to use malloc()
or your own allocator, YOU NEED TO CLEAR THE MEMORY ALLOCATED. Otherwise
you will experience strange bugs */
- return calloc(size,1);
+ return malloc(size);
}
#endif
@@ -56,7 +56,7 @@
static inline void *celt_alloc_scratch (size_t size)
{
/* Scratch space doesn't need to be cleared */
- return calloc(size,1);
+ return malloc(size);
}
#endif