From e312ef1d1c2bbfd3a0e66a8d40dcc047327d1580 Mon Sep 17 00:00:00 2001 From: Eduardo Silva Date: Mon, 15 Mar 2021 09:29:06 -0600 Subject: [PATCH] filter: on unloading due to init error, use instance destroy (#3197) Signed-off-by: Eduardo Silva --- src/flb_filter.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/flb_filter.c b/src/flb_filter.c index b3af5c04847..8cc8fbbe27b 100644 --- a/src/flb_filter.c +++ b/src/flb_filter.c @@ -366,8 +366,7 @@ int flb_filter_init_all(struct flb_config *config) ) { flb_warn("[filter] NO match rule for %s filter instance, unloading.", ins->name); - mk_list_del(&ins->_head); - flb_free(ins); + flb_filter_instance_destroy(ins); continue; } if (ins->log_level == -1) {