diff --git a/src/memcachec.c b/src/memcachec.c
index 013b6c4ed6f83053fa42ace7848218fcaaf5448c..1e1d42dcae65dd9414cfbf3dda4f7186c3cc3732 100644 (file)
--- a/src/memcachec.c
+++ b/src/memcachec.c
WARNING ("memcachec plugin: Ignoring arguments for the `Match' block.");
}
WARNING ("memcachec plugin: Ignoring arguments for the `Match' block.");
}
- match = (web_match_t *) malloc (sizeof (*match));
+ match = calloc (1, sizeof (*match));
if (match == NULL)
{
if (match == NULL)
{
- ERROR ("memcachec plugin: malloc failed.");
+ ERROR ("memcachec plugin: calloc failed.");
return (-1);
}
return (-1);
}
- memset (match, 0, sizeof (*match));
status = 0;
for (i = 0; i < ci->children_num; i++)
status = 0;
for (i = 0; i < ci->children_num; i++)
return (-1);
}
return (-1);
}
- page = (web_page_t *) malloc (sizeof (*page));
+ page = calloc (1, sizeof (*page));
if (page == NULL)
{
if (page == NULL)
{
- ERROR ("memcachec plugin: malloc failed.");
+ ERROR ("memcachec plugin: calloc failed.");
return (-1);
}
return (-1);
}
- memset (page, 0, sizeof (*page));
page->server = NULL;
page->key = NULL;
page->server = NULL;
page->key = NULL;