From 63e4679e30ecafe38d70f7e2445cef5cf38261f3 Mon Sep 17 00:00:00 2001 From: Phillip Whelan Date: Thu, 21 Apr 2022 10:27:52 -0400 Subject: [PATCH] plugin_proxy: destroy input context data after exiting the input thread. Signed-off-by: Hiroshi Hatake --- src/flb_plugin_proxy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/flb_plugin_proxy.c b/src/flb_plugin_proxy.c index 247e2721b14..4bd81201a52 100644 --- a/src/flb_plugin_proxy.c +++ b/src/flb_plugin_proxy.c @@ -132,12 +132,12 @@ static int flb_proxy_input_cb_exit(void *in_context, struct flb_config *config) it = in_context; ctx = container_of(it, struct flb_plugin_input_proxy_thread_config, it); + flb_input_thread_destroy(it, ctx->ins); + if (ctx->proxy->def->proxy == FLB_PROXY_GOLANG) { proxy_go_input_destroy(ctx->proxy->data); } - flb_input_thread_destroy(it, ctx->ins); - flb_plugin_proxy_destroy(ctx->proxy); flb_free(ctx);