From 872f146a794e43a3a4969927d55e22be8f2c8ee1 Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Fri, 9 Dec 2016 18:15:29 +0100 Subject: [PATCH] target_set: plug leak on error CID 157645 --- src/target_set.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/target_set.c b/src/target_set.c index 5bf40fa3..7d54c93b 100644 --- a/src/target_set.c +++ b/src/target_set.c @@ -358,6 +358,7 @@ static int ts_invoke(const data_set_t *ds, value_list_t *vl, /* {{{ */ ERROR("Target `set': Unable to get replacement metadata value `%s'.", key); strarray_free(meta_toc, (size_t)meta_entries); + meta_data_destroy(new_meta); return (status); } @@ -373,6 +374,7 @@ static int ts_invoke(const data_set_t *ds, value_list_t *vl, /* {{{ */ if (status) { ERROR("Target `set': Unable to set metadata value `%s'.", key); strarray_free(meta_toc, (size_t)meta_entries); + meta_data_destroy(new_meta); return (status); } } -- 2.30.2