From: Vsevolod Stakhov Date: Wed, 12 Sep 2018 12:01:03 +0000 (+0100) Subject: [Fix] Do not allow events deletions on cleanup X-Git-Tag: 1.8.0~127 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=219e642ffd46aac0ae905ef682df16eab9b6e93b;p=thirdparty%2Frspamd.git [Fix] Do not allow events deletions on cleanup --- diff --git a/src/libserver/events.c b/src/libserver/events.c index a15338e7a7..9fa2c69c1d 100644 --- a/src/libserver/events.c +++ b/src/libserver/events.c @@ -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;