projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Makefile: Add testwrapper.sh to dist tarballs.
[collectd.git]
/
src
/
match_hashed.c
diff --git
a/src/match_hashed.c
b/src/match_hashed.c
index
ba0c47c
..
4178d75
100644
(file)
--- a/
src/match_hashed.c
+++ b/
src/match_hashed.c
@@
-101,13
+101,12
@@
static int mh_create (const oconfig_item_t *ci, void **user_data) /* {{{ */
mh_match_t *m;
int i;
mh_match_t *m;
int i;
- m =
(mh_match_t *) malloc (
sizeof (*m));
+ m =
calloc (1,
sizeof (*m));
if (m == NULL)
{
if (m == NULL)
{
- ERROR ("mh_create:
m
alloc failed.");
+ ERROR ("mh_create:
c
alloc failed.");
return (-ENOMEM);
}
return (-ENOMEM);
}
- memset (m, 0, sizeof (*m));
for (i = 0; i < ci->children_num; i++)
{
for (i = 0; i < ci->children_num; i++)
{