From 07cb8cc99f1f1992faf0be8571e07632abe7f931 Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Fri, 1 Apr 2016 18:39:57 +0200 Subject: [PATCH] write_redis plugin: malloc + memset -> calloc --- src/write_redis.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/write_redis.c b/src/write_redis.c index 4bfcc73d..a79eb36b 100644 --- a/src/write_redis.c +++ b/src/write_redis.c @@ -171,10 +171,9 @@ static int wr_config_node (oconfig_item_t *ci) /* {{{ */ int status; int i; - node = malloc (sizeof (*node)); + node = calloc (1, sizeof (*node)); if (node == NULL) return (ENOMEM); - memset (node, 0, sizeof (*node)); node->host = NULL; node->port = 0; node->timeout.tv_sec = 0; -- 2.11.0