int status;
int i;
- xpath = malloc (sizeof (*xpath));
+ xpath = calloc (1, sizeof (*xpath));
if (xpath == NULL)
{
- ERROR ("curl_xml plugin: malloc failed.");
+ ERROR ("curl_xml plugin: calloc failed.");
return (-1);
}
- memset (xpath, 0, sizeof (*xpath));
status = cf_util_get_string (ci, &xpath->path);
if (status != 0)
return (-1);
}
- db = malloc (sizeof (*db));
+ db = calloc (1, sizeof (*db));
if (db == NULL)
{
- ERROR ("curl_xml plugin: malloc failed.");
+ ERROR ("curl_xml plugin: calloc failed.");
return (-1);
}
- memset (db, 0, sizeof (*db));
db->timeout = -1;