X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Futils_fbhash.c;h=f27c08272cb5cde3734975236164943bcd2757bd;hb=5f8ea314e1852736d1e4b1e28b0b5288aad6f41a;hp=cbd150610205255a8a20478a324175a7feebd35a;hpb=f14feb1eddfe5760a64640b98ab7bbc5c493f614;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)