summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e7d3796)
raw | patch | inline | side by side (parent: e7d3796)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Fri, 1 Apr 2016 16:44:18 +0000 (18:44 +0200) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Fri, 1 Apr 2016 16:44:18 +0000 (18:44 +0200) |
src/write_sensu.c | patch | blob | history |
diff --git a/src/write_sensu.c b/src/write_sensu.c
index aae5d8bbfa73dc4929e2c51db1e5319d3807a7e4..5e231a5806297d1b75509a113f4e642e30167d53 100644 (file)
--- a/src/write_sensu.c
+++ b/src/write_sensu.c
} else
retlen = strlen(str);
- ret = malloc(retlen + 1);
+ ret = calloc(1, retlen + 1);
if (ret == NULL)
return NULL;
// added to original: not optimized, but keeps valgrind happy.
- memset(ret, 0, retlen + 1);
r = ret;
p = str;