]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Do not allow events deletions on cleanup
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 12 Sep 2018 12:01:03 +0000 (13:01 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 12 Sep 2018 12:01:28 +0000 (13:01 +0100)
src/libserver/events.c

index a15338e7a7345a0aa914a8834dad57e4b423fd57..9fa2c69c1d467322a246cfb8439c4c84b1eb8d12 100644 (file)
@@ -238,6 +238,11 @@ rspamd_session_remove_event (struct rspamd_async_session *session,
                return;
        }
 
+       if (!RSPAMD_SESSION_CAN_ADD_EVENT (session)) {
+               /* Session is already cleaned up, ignore this */
+               return;
+       }
+
        /* Search for event */
        search_ev.fin = fin;
        search_ev.user_data = ud;