From: Vsevolod Stakhov Date: Fri, 5 Nov 2021 20:50:06 +0000 (+0000) Subject: [Minor] Avoid null dereference on error path X-Git-Tag: 3.2~289 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=dbcbc2a0ec825f9a586f40aa6af836efd65e4b8f;p=rspamd.git [Minor] Avoid null dereference on error path --- 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