From: Vsevolod Stakhov Date: Mon, 19 Jan 2026 14:09:01 +0000 (+0000) Subject: [Fix] Guard fuzzy TCP session cleanup X-Git-Tag: 4.0.0~184 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b32273abffc7eae4127071a0246dfc02a85bc8db;p=thirdparty%2Frspamd.git [Fix] Guard fuzzy TCP session cleanup --- diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c index 77f838ad14..9d7d9669b5 100644 --- a/src/plugins/fuzzy_check.c +++ b/src/plugins/fuzzy_check.c @@ -2981,10 +2981,12 @@ fuzzy_io_fin(void *ud) if (session->commands) { g_ptr_array_free(session->commands, TRUE); + session->commands = NULL; } if (session->results) { g_ptr_array_free(session->results, TRUE); + session->results = NULL; } /* Only cleanup fd and ev_watcher for UDP sessions */ @@ -4723,6 +4725,9 @@ fuzzy_tcp_timer_callback(EV_P_ ev_timer *w, int revents) /* Check pending timeouts for all requests in this rule (periodic check) */ fuzzy_tcp_check_pending_timeouts(session->rule, now); + if (session->commands == NULL) { + return; + } /* Check if all commands have been replied */ for (i = 0; i < session->commands->len; i++) {