aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-11-05 20:50:06 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-11-05 20:50:06 +0000
commitdbcbc2a0ec825f9a586f40aa6af836efd65e4b8f (patch)
treed530d507d8d14e7b7b4725642a4ae42ba7e8e147
parentf32f0c8435634bc985e90ca0327cfbe754c4043d (diff)
downloadrspamd-dbcbc2a0ec825f9a586f40aa6af836efd65e4b8f.tar.gz
rspamd-dbcbc2a0ec825f9a586f40aa6af836efd65e4b8f.zip
[Minor] Avoid null dereference on error path
-rw-r--r--src/libstat/stat_config.c6
1 files changed, 6 insertions, 0 deletions
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