aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-08-05 16:05:13 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-08-05 16:06:22 +0100
commit1dc23f0aef838ead2485d71df6c0d46fd6a7b032 (patch)
tree8af23d9cb99b9d7b1004fe044cdb10b9d6e7c122 /src
parentafb7ed76935a92b745ca4104214572d34caf2375 (diff)
downloadrspamd-1dc23f0aef838ead2485d71df6c0d46fd6a7b032.tar.gz
rspamd-1dc23f0aef838ead2485d71df6c0d46fd6a7b032.zip
[Minor] Small fixes to lua stack management
Diffstat (limited to 'src')
-rw-r--r--src/lua/lua_html.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lua/lua_html.c b/src/lua/lua_html.c
index 330c08fa8..f21432e9f 100644
--- a/src/lua/lua_html.c
+++ b/src/lua/lua_html.c
@@ -411,16 +411,17 @@ lua_html_node_foreach_cb (GNode *n, gpointer d)
lua_pushnumber (ud->L, tag->content_length);
if (lua_pcall (ud->L, 2, 1, 0) != 0) {
- lua_settop (ud->L, 0);
+ msg_err ("error in foreach_tag callback: %s", lua_tostring (ud->L, -1));
+ lua_pop (ud->L, 1);
return TRUE;
}
if (lua_toboolean (ud->L, -1)) {
- lua_settop (ud->L, 0);
+ lua_pop (ud->L, 1);
return TRUE;
}
- lua_settop (ud->L, 0);
+ lua_pop (ud->L, 1);
}
return FALSE;