RMPS: calloc over malloc - zeroes!
This commit is contained in:
@@ -150,7 +150,7 @@ void *agent_pool(void *args)
|
|||||||
pthread_attr_t attr;
|
pthread_attr_t attr;
|
||||||
pthread_t *agent_thread = calloc(pool->size, sizeof(*agent_thread));
|
pthread_t *agent_thread = calloc(pool->size, sizeof(*agent_thread));
|
||||||
struct agent_args *agent_struct =
|
struct agent_args *agent_struct =
|
||||||
malloc(pool->size * sizeof(*agent_struct));
|
calloc(pool->size, sizeof(*agent_struct));
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
pthread_cleanup_push(shutdown_pool, agent_struct);
|
pthread_cleanup_push(shutdown_pool, agent_struct);
|
||||||
|
|||||||
Reference in New Issue
Block a user