From 9a5e08d7120acc84f7494260a6e46e6f4401e079 Mon Sep 17 00:00:00 2001 From: Mark Stemm Date: Fri, 23 Sep 2016 15:34:32 -0700 Subject: [PATCH] Fix lua stack leak. Need to pop the results of process_event so the stack doesn't grow without bound. --- userspace/engine/falco_engine.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/userspace/engine/falco_engine.cpp b/userspace/engine/falco_engine.cpp index 15aa11d4..c3a391b2 100644 --- a/userspace/engine/falco_engine.cpp +++ b/userspace/engine/falco_engine.cpp @@ -113,6 +113,7 @@ falco_engine::rule_result *falco_engine::process_event(sinsp_evt *ev) res->rule = p; res->priority = lua_tostring(m_ls, -2); res->format = lua_tostring(m_ls, -1); + lua_pop(m_ls, 3); } else {