X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fdaemon%2Futils_tail.c;h=0b0a8fb41ce9a1064d3d4b27cc9f37c34000e82a;hb=290741f2e6de9e9b467463c1f0c6f031c4036428;hp=fe5dca89b891ef3b8c874b2ee7cb8d414e172409;hpb=c346dc6b18ee4215ccab911c1732c5c39a961baf;p=collectd.git diff --git a/src/daemon/utils_tail.c b/src/daemon/utils_tail.c index fe5dca89..0b0a8fb4 100644 --- a/src/daemon/utils_tail.c +++ b/src/daemon/utils_tail.c @@ -119,10 +119,9 @@ cu_tail_t *cu_tail_create (const char *file) { cu_tail_t *obj; - obj = (cu_tail_t *) malloc (sizeof (cu_tail_t)); + obj = calloc (1, sizeof (*obj)); if (obj == NULL) return (NULL); - memset (obj, '\0', sizeof (cu_tail_t)); obj->file = strdup (file); if (obj->file == NULL)