]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Do not load errored hyperscan database
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 26 Oct 2020 20:22:46 +0000 (20:22 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 26 Oct 2020 20:22:46 +0000 (20:22 +0000)
src/hs_helper.c

index 5cef731f2ea831ac3271215cb13e72766d24518d..1f915b01bc7c6e409bd8d37c6d0d1585eb949e34 100644 (file)
@@ -214,6 +214,13 @@ rspamd_rs_compile_cb (guint ncompiled, GError *err, void *cbd)
 
        ctx = (struct hs_helper_ctx *)worker->ctx;
 
+       if (err != NULL) {
+               /* Failed to compile: log and go out */
+               msg_err ("cannot compile Hyperscan database: %e", err);
+
+               return;
+       }
+
        if (ncompiled > 0) {
                /* Enforce update for other workers */
                hack_global_forced = TRUE;