From: Florian Forster Date: Wed, 22 Nov 2017 06:47:14 +0000 (+0100) Subject: set target: Fix memory leak. X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=dc3fcdf153c610f4901a18baa56974221ec1c9bd;p=collectd.git set target: Fix memory leak. CID: 157645 --- diff --git a/src/target_set.c b/src/target_set.c index 7c02c487..e7a32885 100644 --- a/src/target_set.c +++ b/src/target_set.c @@ -353,6 +353,7 @@ static int ts_invoke(const data_set_t *ds, value_list_t *vl, /* {{{ */ int status = meta_data_toc(data->meta, &meta_toc); if (status < 0) { ERROR("Target `set': meta_data_toc failed with status %d.", status); + meta_data_destroy(new_meta); return status; } size_t meta_entries = (size_t)status;