aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2023-06-14 22:31:16 +0100
committerVsevolod Stakhov <vsevolod@rspamd.com>2023-06-14 22:31:16 +0100
commit678596c9987d1f758f4240aabb429d14b1def96b (patch)
tree8f7a0986a03e29d72ca2e5b0713276d99afb99d5
parentcd65f390d22f8744850a16ff1c95fe2420a6c8ee (diff)
downloadrspamd-678596c9987d1f758f4240aabb429d14b1def96b.tar.gz
rspamd-678596c9987d1f758f4240aabb429d14b1def96b.zip
[Minor] Fix Lua stack
-rw-r--r--src/lua/lua_map.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lua/lua_map.c b/src/lua/lua_map.c
index 29e2053f2..498c097ac 100644
--- a/src/lua/lua_map.c
+++ b/src/lua/lua_map.c
@@ -1106,7 +1106,7 @@ lua_map_foreach_cb (gconstpointer key, gconstpointer value, gsize _hits, gpointe
if (lua_pcall(L, 2, 1, 0) != 0) {
msg_err("call to map foreach callback failed: %s", lua_tostring(L, -1));
- lua_pop(L, 2); /* error + function */
+ lua_pop(L, 1); /* error */
return FALSE;
}
@@ -1117,7 +1117,7 @@ lua_map_foreach_cb (gconstpointer key, gconstpointer value, gsize _hits, gpointe
return lua_toboolean (L, -1);
}
- lua_pop (L, 2); /* result + function */
+ lua_pop (L, 1); /* result */
}
return TRUE;