|
|
|
@ -94,7 +94,7 @@ static int DetectSeqMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
|
|
|
|
|
*/
|
|
|
|
|
static int DetectSeqSetup (DetectEngineCtx *de_ctx, Signature *s, char *optstr)
|
|
|
|
|
{
|
|
|
|
|
DetectSeqData *data;
|
|
|
|
|
DetectSeqData *data = NULL;
|
|
|
|
|
SigMatch *sm = NULL;
|
|
|
|
|
|
|
|
|
|
data = SCMalloc(sizeof(DetectSeqData));
|
|
|
|
@ -102,9 +102,8 @@ static int DetectSeqSetup (DetectEngineCtx *de_ctx, Signature *s, char *optstr)
|
|
|
|
|
goto error;
|
|
|
|
|
|
|
|
|
|
sm = SigMatchAlloc();
|
|
|
|
|
if (sm == NULL) {
|
|
|
|
|
if (sm == NULL)
|
|
|
|
|
goto error;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
sm->type = DETECT_SEQ;
|
|
|
|
|
|
|
|
|
@ -119,7 +118,10 @@ static int DetectSeqSetup (DetectEngineCtx *de_ctx, Signature *s, char *optstr)
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
|
|
error:
|
|
|
|
|
if (data) SCFree(data);
|
|
|
|
|
if (data)
|
|
|
|
|
SCFree(data);
|
|
|
|
|
if (sm)
|
|
|
|
|
SigMatchFree(sm);
|
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|