projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
perl: Check for NULL before dereferencing
[collectd.git]
/
src
/
curl_json.c
diff --git
a/src/curl_json.c
b/src/curl_json.c
index
ff07e76
..
6fdae51
100644
(file)
--- a/
src/curl_json.c
+++ b/
src/curl_json.c
@@
-500,6
+500,7
@@
static int cj_config_add_key (cj_t *db, /* {{{ */
{
ERROR ("curl_json plugin: cj_config: "
"Invalid key: %s", ci->key);
+ cj_key_free (key);
return (-1);
}
@@
-670,6
+671,7
@@
static int cj_config_add_url (oconfig_item_t *ci) /* {{{ */
{
ERROR ("curl_json plugin: cj_config: "
"Invalid key: %s", ci->key);
+ cj_free (db);
return (-1);
}
if (status != 0)