diff --git a/src/detect.c b/src/detect.c index ad17023649..bf6e4a233e 100644 --- a/src/detect.c +++ b/src/detect.c @@ -520,8 +520,10 @@ static int SigMatchSignaturesAppLayer(ThreadVars *th_v, DetectEngineCtx *de_ctx, sm = s->match; while (sm) { - if (sigmatch_table[sm->type].AppLayerMatch == NULL) + if (sigmatch_table[sm->type].AppLayerMatch == NULL) { + sm = sm->next; continue; + } match = sigmatch_table[sm->type].AppLayerMatch(th_v, det_ctx, p->flow, flags, alstate, s, sm); if (match) { @@ -709,8 +711,10 @@ int SigMatchSignatures(ThreadVars *th_v, DetectEngineCtx *de_ctx, DetectEngineTh do { sm = s->match; while (sm) { - if (sigmatch_table[sm->type].Match == NULL) + if (sigmatch_table[sm->type].Match == NULL) { + sm = sm->next; continue; + } match = sigmatch_table[sm->type].Match(th_v, det_ctx, p, s, sm); if (match) { @@ -747,8 +751,10 @@ int SigMatchSignatures(ThreadVars *th_v, DetectEngineCtx *de_ctx, DetectEngineTh SCLogDebug("running match functions, sm %p", sm); while (sm) { - if (sigmatch_table[sm->type].Match == NULL) + if (sigmatch_table[sm->type].Match == NULL) { + sm = sm->next; continue; + } match = sigmatch_table[sm->type].Match(th_v, det_ctx, p, s, sm); if (match) {