diff --git a/src/curl_json.c b/src/curl_json.c
index 937a237e06f7c5cba61eb6d0fc713919dc4c1ab9..5aceae4e59e45ee55e3400340660c51b4dc4f78f 100644 (file)
--- a/src/curl_json.c
+++ b/src/curl_json.c
{
ERROR ("curl_json plugin: cj_config: "
"Invalid key: %s", ci->key);
+ cj_key_free (key);
return (-1);
}
db->tree = cj_avl_create();
tree = db->tree;
- name = key->path;
ptr = key->path;
if (*ptr == '/')
++ptr;
if (*ptr == '/')
{
c_avl_tree_t *value;
- int len;
+ size_t len;
len = ptr-name;
if (len == 0)
{
ERROR ("curl_json plugin: cj_config: "
"Invalid key: %s", ci->key);
+ cj_free (db);
return (-1);
}
if (status != 0)