X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Futils_fbhash.c;h=f27c08272cb5cde3734975236164943bcd2757bd;hb=42ca41a0798e3a2b742f7da3bacc03fbaf6175fa;hp=cbd150610205255a8a20478a324175a7feebd35a;hpb=d5565943cd7ee338e5b750a027faff8115df4c72;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)