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 #1739 from tokkee/sh/memcheck
[collectd.git]
/
src
/
daemon
/
types_list.c
diff --git
a/src/daemon/types_list.c
b/src/daemon/types_list.c
index
3ac38f2
..
de6fce3
100644
(file)
--- a/
src/daemon/types_list.c
+++ b/
src/daemon/types_list.c
@@
-112,12
+112,10
@@
static void parse_line (char *buf)
if (fields[0][0] == '#')
return;
- ds =
malloc (
sizeof (*ds));
+ ds =
calloc (1,
sizeof (*ds));
if (ds == NULL)
return;
- memset (ds, '\0', sizeof (data_set_t));
-
sstrncpy (ds->type, fields[0], sizeof (ds->type));
ds->ds_num = fields_num - 1;