From 8eb112a20962958a7e0a6ef0e0a56a055b10c18d Mon Sep 17 00:00:00 2001 From: Hiroshi Hatake Date: Tue, 31 Oct 2023 16:23:57 +0900 Subject: [PATCH] filter_lua: Plug a memory leak on loading for an invalid lua script Signed-off-by: Hiroshi Hatake --- plugins/filter_lua/lua.c | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/filter_lua/lua.c b/plugins/filter_lua/lua.c index bb7bb566ab4..89aa8cd478e 100644 --- a/plugins/filter_lua/lua.c +++ b/plugins/filter_lua/lua.c @@ -77,6 +77,7 @@ static int cb_lua_init(struct flb_filter_instance *f_ins, } if (ret == -1) { + flb_luajit_destroy(ctx->lua); lua_config_destroy(ctx); return -1; }