From: Ruben Kerkhof Date: Sat, 25 Jul 2015 10:32:06 +0000 (+0200) Subject: Fix a memory leak on shutdown X-Git-Tag: collectd-5.5.1~68^2~5 X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=d089d2691a24a1d9bdbb02e350405843c808d2bc;p=collectd.git Fix a memory leak on shutdown --- diff --git a/src/plugin.c b/src/plugin.c index 5d31e46f..97352c47 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -181,13 +181,13 @@ static void destroy_read_heap (void) /* {{{ */ while (42) { - callback_func_t *cf; + read_func_t *rf; - cf = c_heap_get_root (read_heap); - if (cf == NULL) + rf = c_heap_get_root (read_heap); + if (rf == NULL) break; - - destroy_callback (cf); + sfree (rf->rf_name); + destroy_callback ((callback_func_t *) rf); } c_heap_destroy (read_heap);