diff --git a/src/agent_pool.c b/src/agent_pool.c index 22806fe..6ba113a 100644 --- a/src/agent_pool.c +++ b/src/agent_pool.c @@ -150,7 +150,7 @@ void *agent_pool(void *args) pthread_attr_t attr; pthread_t *agent_thread = calloc(pool->size, sizeof(*agent_thread)); struct agent_args *agent_struct = - malloc(pool->size * sizeof(*agent_struct)); + calloc(pool->size, sizeof(*agent_struct)); int i; pthread_cleanup_push(shutdown_pool, agent_struct);