This race condition could occur if a message has too high spam score and the
planner decides to stop checking. However, already registered events
pending were not checked, which caused use-after-free for a task object.
if (!task->pass_all_filters &&
metric->actions[METRIC_ACTION_REJECT].score > 0 &&
check_metric_is_spam (task, metric)) {
- task->state = WRITE_REPLY;
+ msg_info ("<%s> has already scored more than %.2f, so do not "
+ "plan any more checks", task->message_id,
+ metric->actions[METRIC_ACTION_REJECT].score);
return 1;
}
cur = g_list_next (cur);