X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Futils_fbhash.c;h=f27c08272cb5cde3734975236164943bcd2757bd;hb=db35efb33e81d0a013e09a8a6ffa362ad5962f7c;hp=cbd150610205255a8a20478a324175a7feebd35a;hpb=aedf67e69cbe93a6925fd1004a7c8b990aed4b0a;p=collectd.git diff --git a/src/utils_fbhash.c b/src/utils_fbhash.c index cbd15061..f27c0827 100644 --- a/src/utils_fbhash.c +++ b/src/utils_fbhash.c @@ -209,10 +209,9 @@ fbhash_t *fbh_create (const char *file) /* {{{ */ if (file == NULL) return (NULL); - h = malloc (sizeof (*h)); + h = calloc (1, sizeof (*h)); if (h == NULL) return (NULL); - memset (h, 0, sizeof (*h)); h->filename = strdup (file); if (h->filename == NULL)