summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b59a0c0)
raw | patch | inline | side by side (parent: b59a0c0)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Mon, 28 Mar 2016 17:50:51 +0000 (19:50 +0200) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Mon, 28 Mar 2016 17:50:51 +0000 (19:50 +0200) |
src/curl_xml.c | patch | blob | history |
diff --git a/src/curl_xml.c b/src/curl_xml.c
index ab18b78083ab58471765a32a48f55ca2e4a805d7..b9f0c24fc56d47599e4f042944e3e1736ad03933 100644 (file)
--- a/src/curl_xml.c
+++ b/src/curl_xml.c
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;