X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Futils_latency.c;h=41af00cb14188b5e51f8a9d0e3d3e559e16a2967;hb=db35efb33e81d0a013e09a8a6ffa362ad5962f7c;hp=ca7d5fab3d582672554f344fb9ed60791fdbb1f1;hpb=c346dc6b18ee4215ccab911c1732c5c39a961baf;p=collectd.git diff --git a/src/utils_latency.c b/src/utils_latency.c index ca7d5fab..41af00cb 100644 --- a/src/utils_latency.c +++ b/src/utils_latency.c @@ -121,10 +121,9 @@ latency_counter_t *latency_counter_create (void) /* {{{ */ { latency_counter_t *lc; - lc = malloc (sizeof (*lc)); + lc = calloc (1, sizeof (*lc)); if (lc == NULL) return (NULL); - memset (lc, 0, sizeof (*lc)); latency_counter_reset (lc); lc->bin_width = HISTOGRAM_DEFAULT_BIN_WIDTH;