From f7f02899b3634e4b4a47e52a095afbe2f7b830fb Mon Sep 17 00:00:00 2001 From: Bogomil Vasilev Date: Thu, 24 Jan 2019 00:11:53 +0200 Subject: [PATCH] RMPS: calloc over malloc - zeroes! --- src/agent_pool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);