aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-03-15 15:54:33 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-03-15 15:54:33 +0000
commit00c5580c76282c2d6fbe055956cb178c10cdb381 (patch)
treeb36c17a787b2ce0e24083701b66b5801bb7c7ec5 /src
parent5301926307c441c811167f21614b2b42075b0c65 (diff)
downloadrspamd-00c5580c76282c2d6fbe055956cb178c10cdb381.tar.gz
rspamd-00c5580c76282c2d6fbe055956cb178c10cdb381.zip
[Minor] Fix lua stack for history
Diffstat (limited to 'src')
-rw-r--r--src/controller.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/controller.c b/src/controller.c
index dff75c9e1..e878806a5 100644
--- a/src/controller.c
+++ b/src/controller.c
@@ -1501,27 +1501,23 @@ rspamd_controller_handle_lua_history (lua_State *L,
}
else {
msg_err_session ("rspamd_plugins.history.handler is not a function");
- lua_pop (L, 3);
+ lua_settop (L, 0);
goto err;
}
-
- lua_pop (L, 1); /* Function */
}
else {
msg_err_session ("rspamd_plugins.history is not a table");
- lua_pop (L, 2);
+ lua_settop (L, 0);
goto err;
}
-
- lua_pop (L, 1); /* plugins.history */
}
else {
msg_err_session ("rspamd_plugins is absent or has incorrect type");
- lua_pop (L, 1);
+ lua_settop (L, 0);
goto err;
}
- lua_pop (L, 1); /* plugins global */
+ lua_settop (L, 0);
return;
err: