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/lua_redis.c | |
parent | f29fb4de499b145b29a1cb22b0f7c0f81473ff6b (diff) | |
download | rspamd-b35299b4e3a6cf75cfa19783dda35411508d2913.tar.gz rspamd-b35299b4e3a6cf75cfa19783dda35411508d2913.zip |
Fix leaks in lua error paths
Diffstat (limited to 'src/lua/lua_redis.c')
-rw-r--r-- | src/lua/lua_redis.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lua/lua_redis.c b/src/lua/lua_redis.c index 24f3c93af..4e02107f5 100644 --- a/src/lua/lua_redis.c +++ b/src/lua/lua_redis.c @@ -190,6 +190,7 @@ lua_redis_push_error (const gchar *err, lua_pushnil (ud->L); if (lua_pcall (ud->L, 3, 0, 0) != 0) { msg_info ("call to callback failed: %s", lua_tostring (ud->L, -1)); + lua_pop (ud->L, 1); } if (connected) { @@ -251,6 +252,7 @@ lua_redis_push_data (const redisReply *r, struct lua_redis_ctx *ctx) if (lua_pcall (ud->L, 3, 0, 0) != 0) { msg_info ("call to callback failed: %s", lua_tostring (ud->L, -1)); + lua_pop (ud->L, 1); } rspamd_session_remove_event (ud->task->s, lua_redis_fin, ctx); |