diff --git a/src/mem.c b/src/mem.c index 787c0f04..d4a15797 100644 --- a/src/mem.c +++ b/src/mem.c @@ -340,7 +340,7 @@ static void* _tf_uv_calloc(size_t nmemb, size_t size) count = tf_util_backtrace(buffer, sizeof(buffer) / sizeof(*buffer)); overhead += sizeof(tf_mem_node_t) + sizeof(void*) * count; } - void* ptr = calloc(1, nmemb * rounded_up_size + overhead); + void* ptr = calloc(1, rounded_up_size + overhead); if (ptr) { __atomic_add_fetch(&s_uv_malloc_size, total_size, __ATOMIC_RELAXED);