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