From: Florian Forster Date: Fri, 19 Jun 2015 08:54:02 +0000 (+0200) Subject: curl_json plugin: Fix memory leak. X-Git-Tag: collectd-5.5.1~68^2~32 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=8cd1b6a9a55b41049ba3057583124a60b8bdbcbf;p=collectd.git curl_json plugin: Fix memory leak. --- diff --git a/src/curl_json.c b/src/curl_json.c index ff07e76b..6fdae51d 100644 --- 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)