From 8cd1b6a9a55b41049ba3057583124a60b8bdbcbf Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Fri, 19 Jun 2015 10:54:02 +0200 Subject: [PATCH] curl_json plugin: Fix memory leak. --- src/curl_json.c | 2 ++ 1 file changed, 2 insertions(+) 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) -- 2.30.2