summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 129fdc5)
raw | patch | inline | side by side (parent: 129fdc5)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Fri, 1 Apr 2016 15:10:05 +0000 (17:10 +0200) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Fri, 1 Apr 2016 15:10:05 +0000 (17:10 +0200) |
src/memcachec.c | patch | blob | history |
diff --git a/src/memcachec.c b/src/memcachec.c
index a23d4956e1e978b0910ab1ef05e8a4ed5b930de4..1e1d42dcae65dd9414cfbf3dda4f7186c3cc3732 100644 (file)
--- a/src/memcachec.c
+++ b/src/memcachec.c
WARNING ("memcachec plugin: Ignoring arguments for the `Match' block.");
}
- match = malloc (sizeof (*match));
+ match = calloc (1, sizeof (*match));
if (match == NULL)
{
- ERROR ("memcachec plugin: malloc failed.");
+ ERROR ("memcachec plugin: calloc failed.");
return (-1);
}
- memset (match, 0, sizeof (*match));
status = 0;
for (i = 0; i < ci->children_num; i++)
return (-1);
}
- page = malloc (sizeof (*page));
+ page = calloc (1, sizeof (*page));
if (page == NULL)
{
- ERROR ("memcachec plugin: malloc failed.");
+ ERROR ("memcachec plugin: calloc failed.");
return (-1);
}
- memset (page, 0, sizeof (*page));
page->server = NULL;
page->key = NULL;