From: Victor Julien Date: Wed, 19 Jun 2019 10:48:22 +0000 (+0200) Subject: detect/prefilter: minor error handling cleanup X-Git-Tag: suricata-5.0.0-rc1~246 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0cecb1c3b29a0ed87d65b1f124a029aea533c29c;p=thirdparty%2Fsuricata.git detect/prefilter: minor error handling cleanup --- diff --git a/src/detect-engine-prefilter.c b/src/detect-engine-prefilter.c index bccb2fd157..1b95bb612c 100644 --- a/src/detect-engine-prefilter.c +++ b/src/detect-engine-prefilter.c @@ -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