summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e2fc27c)
raw | patch | inline | side by side (parent: e2fc27c)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Mon, 28 Mar 2016 17:50:38 +0000 (19:50 +0200) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Mon, 28 Mar 2016 17:50:38 +0000 (19:50 +0200) |
src/curl_json.c | patch | blob | history |
diff --git a/src/curl_json.c b/src/curl_json.c
index 4fa6f33bc6ce1e55c213fbcfbe8bbbdd4cc75f07..33b1a6fead7f9db643f71386f390dde345605333 100644 (file)
--- a/src/curl_json.c
+++ b/src/curl_json.c
return (-1);
}
- key = malloc (sizeof (*key));
+ key = calloc (1, sizeof (*key));
if (key == NULL)
{
- ERROR ("curl_json plugin: malloc failed.");
+ ERROR ("curl_json plugin: calloc failed.");
return (-1);
}
- memset (key, 0, sizeof (*key));
key->magic = CJ_KEY_MAGIC;
if (strcasecmp ("Key", ci->key) == 0)
return (-1);
}
- db = malloc (sizeof (*db));
+ db = calloc (1, sizeof (*db));
if (db == NULL)
{
- ERROR ("curl_json plugin: malloc failed.");
+ ERROR ("curl_json plugin: calloc failed.");
return (-1);
}
- memset (db, 0, sizeof (*db));
db->timeout = -1;