projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge pull request #1807 from matteocontrini/master
[collectd.git]
/
src
/
daemon
/
utils_tail.c
diff --git
a/src/daemon/utils_tail.c
b/src/daemon/utils_tail.c
index
fe5dca8
..
0b0a8fb
100644
(file)
--- 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)