From: Igor Peshansky Date: Fri, 16 Sep 2016 16:03:35 +0000 (-0400) Subject: Plug a leak in Target:Set. X-Git-Tag: collectd-5.7.0~76 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=1d75a4d1b2735553b254087fdeb8261802e2c10d;p=collectd.git Plug a leak in Target:Set. --- diff --git a/src/target_set.c b/src/target_set.c index 3de86e48..6b44bcc4 100644 --- a/src/target_set.c +++ b/src/target_set.c @@ -393,8 +393,9 @@ static int ts_invoke (const data_set_t *ds, value_list_t *vl, /* {{{ */ DEBUG ("target_set: ts_invoke: setting metadata value for key `%s': " "`%s'.", key, temp); - status = meta_data_add_string (new_meta, key, temp); + sfree (string); + status = meta_data_add_string (new_meta, key, temp); if (status) { ERROR ("Target `set': Unable to set metadata value `%s'.", key);