aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/events.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-09-12 13:01:03 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-09-12 13:01:28 +0100
commit219e642ffd46aac0ae905ef682df16eab9b6e93b (patch)
treec0720f0442d39ce88ca9ed5e66f26904d590c07a /src/libserver/events.c
parent07027a735d66fecf37193be5babf4b8c4f7e02ac (diff)
downloadrspamd-219e642ffd46aac0ae905ef682df16eab9b6e93b.tar.gz
rspamd-219e642ffd46aac0ae905ef682df16eab9b6e93b.zip
[Fix] Do not allow events deletions on cleanup
Diffstat (limited to 'src/libserver/events.c')
-rw-r--r--src/libserver/events.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libserver/events.c b/src/libserver/events.c
index a15338e7a..9fa2c69c1 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;