From: Vsevolod Stakhov Date: Wed, 15 May 2024 15:22:12 +0000 (+0100) Subject: [Minor] Fix issue found by QL scan X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=817e5cde26c43ee4fdb64de47b0f00b8641ba400;p=rspamd.git [Minor] Fix issue found by QL scan --- diff --git a/src/fuzzy_storage.c b/src/fuzzy_storage.c index ca9467af1..5fe6a694a 100644 --- a/src/fuzzy_storage.c +++ b/src/fuzzy_storage.c @@ -2231,7 +2231,7 @@ union sa_union { static void tcp_session_dtor(struct fuzzy_tcp_session *tcp_session) { - struct fuzzy_tcp_reply_queue_elt *rep; + struct fuzzy_tcp_reply_queue_elt *rep, *tmp; fuzzy_common_session_dtor(&tcp_session->common); @@ -2240,7 +2240,7 @@ tcp_session_dtor(struct fuzzy_tcp_session *tcp_session) ev_io_stop(tcp_session->common.ctx->event_loop, &tcp_session->common.io); } - DL_FOREACH(tcp_session->replies_queue, rep) + DL_FOREACH_SAFE(tcp_session->replies_queue, rep, tmp) { g_free(rep); }