ensure zlibwrapper uses ZSTD_malloc() and ZSTD_free()

which is compatible with { NULL, NULL, NULL }
This commit is contained in:
Yann Collet
2017-06-02 14:01:21 -07:00
parent b877e834b1
commit dcb7535352
2 changed files with 27 additions and 29 deletions
+1 -1
View File
@@ -61,7 +61,7 @@ void* ZSTD_calloc(size_t size, ZSTD_customMem customMem)
{
if (customMem.customAlloc) {
/* calloc implemented as malloc+memset;
* not as efficient, but our best guess for custom malloc */
* not as efficient as calloc, but next best guess for custom malloc */
void* const ptr = customMem.customAlloc(customMem.opaque, size);
memset(ptr, 0, size);
return ptr;