aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_kann.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-08-05 15:36:41 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2020-08-05 21:05:09 +0100
commit568fd73ab8ba4cf27a2a8c068885444e87cbd148 (patch)
treeb2e0847d8a1535e2c0c8b8f1ccb1c9ccd5f589b0 /src/lua/lua_kann.c
parent1b0ed3b3a44bb9fec28a65e6624be09de78fa530 (diff)
downloadrspamd-568fd73ab8ba4cf27a2a8c068885444e87cbd148.tar.gz
rspamd-568fd73ab8ba4cf27a2a8c068885444e87cbd148.zip
[Project] Add a simple matrix Lua library
Diffstat (limited to 'src/lua/lua_kann.c')
-rw-r--r--src/lua/lua_kann.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lua/lua_kann.c b/src/lua/lua_kann.c
index e356f5912..33036fe04 100644
--- a/src/lua/lua_kann.c
+++ b/src/lua/lua_kann.c
@@ -1079,6 +1079,7 @@ lua_kann_train1 (lua_State *L)
FREE_VEC (x, n);
FREE_VEC (y, n);
+ lua_pop (L, 1);
n = luaL_error (L, "invalid params at pos %d: "
"bad input dimension %d; %d expected",
s + 1,
@@ -1102,6 +1103,7 @@ lua_kann_train1 (lua_State *L)
lua_rawgeti (L, 3, s + 1);
if (rspamd_lua_table_size (L, -1) != n_out) {
+ lua_pop (L, 1);
FREE_VEC (x, n);
FREE_VEC (y, n);