diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-02-05 12:42:43 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-02-05 12:42:43 +0000 |
commit | b35299b4e3a6cf75cfa19783dda35411508d2913 (patch) | |
tree | da78386cf112c62a0bf81fd04f4d243660e24f28 /src/lua_worker.c | |
parent | f29fb4de499b145b29a1cb22b0f7c0f81473ff6b (diff) | |
download | rspamd-b35299b4e3a6cf75cfa19783dda35411508d2913.tar.gz rspamd-b35299b4e3a6cf75cfa19783dda35411508d2913.zip |
Fix leaks in lua error paths
Diffstat (limited to 'src/lua_worker.c')
-rw-r--r-- | src/lua_worker.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lua_worker.c b/src/lua_worker.c index cb0524638..60456b59f 100644 --- a/src/lua_worker.c +++ b/src/lua_worker.c @@ -286,6 +286,7 @@ lua_accept_socket (gint fd, short what, void *arg) if (lua_pcall (L, 4, 0, 0) != 0) { msg_info ("call to worker accept failed: %s", lua_tostring (L, -1)); + lua_pop (L, 1); } rspamd_inet_address_destroy (addr); @@ -402,6 +403,7 @@ start_lua_worker (struct rspamd_worker *worker) if (lua_pcall (L, 1, 0, 0) != 0) { msg_info ("call to worker finalizer failed: %s", lua_tostring (L, -1)); + lua_pop (L, 1); } /* Free resources */ luaL_unref (L, LUA_REGISTRYINDEX, ctx->cbref_fin); |