summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d0f3e34)
raw | patch | inline | side by side (parent: d0f3e34)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Fri, 1 Apr 2016 16:44:47 +0000 (18:44 +0200) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Fri, 1 Apr 2016 16:44:47 +0000 (18:44 +0200) |
src/write_tsdb.c | patch | blob | history |
diff --git a/src/write_tsdb.c b/src/write_tsdb.c
index c562596b6d753525aafa663ee532d71bcec5d873..0fa6245212fa5311c535b16c9eebec40ff4666c0 100644 (file)
--- a/src/write_tsdb.c
+++ b/src/write_tsdb.c
char callback_name[DATA_MAX_NAME_LEN];
int i;
- cb = malloc(sizeof(*cb));
+ cb = calloc(1, sizeof(*cb));
if (cb == NULL)
{
- ERROR("write_tsdb plugin: malloc failed.");
+ ERROR("write_tsdb plugin: calloc failed.");
return -1;
}
- memset(cb, 0, sizeof(*cb));
cb->sock_fd = -1;
cb->node = NULL;
cb->service = NULL;