]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Avoid null dereference on error path
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 5 Nov 2021 20:50:06 +0000 (20:50 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 5 Nov 2021 20:50:06 +0000 (20:50 +0000)
src/libstat/stat_config.c

index d6fdc9673da5b2d2cbebc43d38388260d89583de..66c7668366ad841745252c58f87b7478ff2e3962 100644 (file)
@@ -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