Don't pop excess values from stack

The call to rule_loader.load_rules only returns 2 values, so only pop
two values from the stack. This fixes #906.

Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
This commit is contained in:
Mark Stemm 2019-10-29 18:10:00 -07:00 committed by Lorenzo Fontana
parent b38db99449
commit 023f510a75

View File

@ -444,7 +444,7 @@ void falco_rules::load_rules(const string &rules_content,
throw falco_exception(err);
}
lua_pop(m_ls, 4);
lua_pop(m_ls, 2);
} else {
throw falco_exception("No function " + m_lua_load_rules + " found in lua rule module");