From: elene-margalit Date: Fri, 28 Aug 2020 10:02:09 +0000 (+0200) Subject: Found and fixed memory leak in function format_metric_distribution. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0c5c61a4aa582ae12c658c750094e98c96ae5beb;p=thirdparty%2Fcollectd.git Found and fixed memory leak in function format_metric_distribution. --- diff --git a/src/utils/format_json/format_json.c b/src/utils/format_json/format_json.c index a679fc8e2..72a5309a2 100644 --- a/src/utils/format_json/format_json.c +++ b/src/utils/format_json/format_json.c @@ -24,6 +24,7 @@ * Authors: * Florian octo Forster * Manoj Srivastava + * Elene Margalitadze **/ #include "collectd.h" @@ -146,6 +147,7 @@ static int format_metric_distribution(strbuf_t buf, yajl_gen g, CHECK(json_add_string(g, "sum")); CHECK(json_add_string(g, buf.ptr)); STRBUF_DESTROY(buf); + destroy_buckets_array(buckets); return 0; }