From 4a16427cc827e7be32c4ed672a17bbb7cade284b Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Wed, 25 Nov 2015 11:51:04 +0100 Subject: [PATCH] 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 --- src/statsd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.30.2