diff --git a/src/write_mongodb.c b/src/write_mongodb.c
index 24151ceb720a3a29a055a0a24e7cdc6993661d45..9a6fdf2697da4b52c7ba7d5fd5f8f39ed96c73c6 100644 (file)
--- a/src/write_mongodb.c
+++ b/src/write_mongodb.c
int status;
int i;
int status;
int i;
- node = malloc (sizeof (*node));
+ node = calloc (1, sizeof (*node));
if (node == NULL)
return (ENOMEM);
if (node == NULL)
return (ENOMEM);
- memset (node, 0, sizeof (*node));
mongo_init (node->conn);
node->host = NULL;
node->store_rates = 1;
mongo_init (node->conn);
node->host = NULL;
node->store_rates = 1;