From: Florian Forster Date: Wed, 25 Nov 2015 10:51:04 +0000 (+0100) Subject: statsd plugin: Correctly free metrics at shutdown. X-Git-Tag: collectd-5.5.1~48^2~2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=4a16427cc827e7be32c4ed672a17bbb7cade284b;p=collectd.git statsd plugin: Correctly free metrics at shutdown. The previous shutdown handler leaked "timer" and "set" metrics. This is not a huge problem in itself, as the daemon is exiting shortly after anyway, but it makes debugging of memory leaks very hard. Issue: #997 --- diff --git a/src/statsd.c b/src/statsd.c index 96c471d2..82dbce77 100644 --- a/src/statsd.c +++ b/src/statsd.c @@ -948,7 +948,7 @@ static int statsd_shutdown (void) /* {{{ */ while (c_avl_pick (metrics_tree, &key, &value) == 0) { sfree (key); - sfree (value); + statsd_metric_free (value); } c_avl_destroy (metrics_tree); metrics_tree = NULL;