X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fapache.c;h=baa6081a6046743679a6949b16d2f07e347aed24;hb=8361c1e963f9184c3c4d87197fd6996d667cdb3f;hp=38035caa22e94cfdeeaac8ef1047ddf443a40fdd;hpb=eb2f3a4bdc78e1e2c4191b4e08d75d5eeea8be0e;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;