]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect/prefilter: minor error handling cleanup
authorVictor Julien <victor@inliniac.net>
Wed, 19 Jun 2019 10:48:22 +0000 (12:48 +0200)
committerVictor Julien <victor@inliniac.net>
Fri, 21 Jun 2019 05:16:17 +0000 (07:16 +0200)
src/detect-engine-prefilter.c

index bccb2fd157ae8459ad4dcecee1e2a9042eef2cf3..1b95bb612c8bfb7b7208648a068ab4e46a7f4b94 100644 (file)
@@ -347,7 +347,10 @@ void PrefilterCleanupRuleGroup(const DetectEngineCtx *de_ctx, SigGroupHead *sgh)
 
 void PrefilterSetupRuleGroup(DetectEngineCtx *de_ctx, SigGroupHead *sgh)
 {
-    BUG_ON(PatternMatchPrepareGroup(de_ctx, sgh) != 0);
+    int r = PatternMatchPrepareGroup(de_ctx, sgh);
+    if (r != 0) {
+        FatalError(SC_ERR_INITIALIZATION, "failed to set up pattern matching");
+    }
 
     /* set up engines if needed - when prefilter is set to auto we run
      * all engines, otherwise only those that have been forced by the