From dbcbc2a0ec825f9a586f40aa6af836efd65e4b8f Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 5 Nov 2021 20:50:06 +0000 Subject: [PATCH] [Minor] Avoid null dereference on error path --- src/libstat/stat_config.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/libstat/stat_config.c b/src/libstat/stat_config.c index d6fdc9673..66c766836 100644 --- a/src/libstat/stat_config.c +++ b/src/libstat/stat_config.c @@ -278,6 +278,12 @@ rspamd_stat_init (struct rspamd_config *cfg, struct ev_loop *ev_base) continue; } } + else { + /* This actually is not implemented so it should never happen */ + g_free (cl); + cur = g_list_next (cur); + continue; + } /* XXX: * Here we get the first classifier tokenizer config as the only one -- 2.39.5