X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fapache.c;h=baa6081a6046743679a6949b16d2f07e347aed24;hb=f81aafecc0b537b4bec734f7fdb0c8352719afee;hp=38035caa22e94cfdeeaac8ef1047ddf443a40fdd;hpb=4ac3040668e7a9b595edd334a9179a5f6ae42461;p=collectd.git 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;