]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Fix race condition in lua_tcp module
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 4 Mar 2016 11:22:36 +0000 (11:22 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 4 Mar 2016 11:22:36 +0000 (11:22 +0000)
src/lua/lua_tcp.c

index a6ebb2dc2a7299b1561ccd4ab7e3bc2b9b211588..3ec06797324085982f8c231d3d517c22621ab4ea 100644 (file)
@@ -113,8 +113,8 @@ static void
 lua_tcp_maybe_free (struct lua_tcp_cbdata *cbd)
 {
        if (cbd->session) {
-               rspamd_session_remove_event (cbd->session, lua_tcp_fin, cbd);
                rspamd_session_watcher_pop (cbd->session, cbd->w);
+               rspamd_session_remove_event (cbd->session, lua_tcp_fin, cbd);
        }
        else {
                lua_tcp_fin (cbd);