From d13a04dc3645a21acecc14a4174837766ecb6a2b Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Mon, 28 Mar 2016 19:40:12 +0200 Subject: [PATCH] apache: malloc + memset -> calloc --- src/apache.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/apache.c b/src/apache.c index 38035caa..baa6081a 100644 --- a/src/apache.c +++ b/src/apache.c @@ -175,13 +175,12 @@ static int config_add (oconfig_item_t *ci) int i; int status; - st = malloc (sizeof (*st)); + st = calloc (1, sizeof (*st)); if (st == NULL) { - ERROR ("apache plugin: malloc failed."); + ERROR ("apache plugin: calloc failed."); return (-1); } - memset (st, 0, sizeof (*st)); st->timeout = -1; -- 2.30.2