]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix issue found by QL scan
authorVsevolod Stakhov <vsevolod@rspamd.com>
Wed, 15 May 2024 15:22:12 +0000 (16:22 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Tue, 25 Jun 2024 13:27:56 +0000 (14:27 +0100)
src/fuzzy_storage.c

index ca9467af1d983fb8215285c4208e17596872dd71..5fe6a694abd911c165326ef75dee6fa03db2242b 100644 (file)
@@ -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);
        }