if (p2 == NULL)
return 0;
ThreadVars th_v;
- DetectEngineThreadCtx *det_ctx;
+ DetectEngineThreadCtx *det_ctx = NULL;
int result = 0;
memset(&th_v, 0, sizeof(ThreadVars));
end:
SigGroupCleanup(de_ctx);
SigCleanSignatures(de_ctx);
- DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
+ if (det_ctx != NULL)
+ DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
SCFree(p1);
SCFree(p2);
if (p2 == NULL)
return 0;
ThreadVars th_v;
- DetectEngineThreadCtx *det_ctx;
+ DetectEngineThreadCtx *det_ctx = NULL;
int result = 1;
uint8_t *buf = (uint8_t *)"GET /one/ HTTP/1.0yyyyyyyyyyyyyyyy\r\n"
}
SigGroupBuild(de_ctx);
- //PatternMatchPrepare(mpm_ctx, MPM_B2G);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx,(void *)&det_ctx);
SigMatchSignatures(&th_v, de_ctx, det_ctx, p1);
SigGroupCleanup(de_ctx);
SigCleanSignatures(de_ctx);
- DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
- //PatternMatchDestroy(mpm_ctx);
+ if (det_ctx != NULL)
+ DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
end:
SCFree(p1);
if (p2 == NULL)
return 0;
ThreadVars th_v;
- DetectEngineThreadCtx *det_ctx;
+ DetectEngineThreadCtx *det_ctx = NULL;
int result = 1;
uint8_t *buf = (uint8_t *)"GET /one/ HTTP/1.0yyyyyyyyyyyyyyyy\r\n"
}
SigGroupBuild(de_ctx);
- //PatternMatchPrepare(mpm_ctx, MPM_B2G);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx,(void *)&det_ctx);
SigMatchSignatures(&th_v, de_ctx, det_ctx, p1);
SigGroupCleanup(de_ctx);
SigCleanSignatures(de_ctx);
- DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
- //PatternMatchDestroy(mpm_ctx);
+ if (det_ctx != NULL)
+ DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
end:
SCFree(p1);
if (p2 == NULL)
return 0;
ThreadVars th_v;
- DetectEngineThreadCtx *det_ctx;
+ DetectEngineThreadCtx *det_ctx = NULL;
int result = 1;
uint8_t *buf = (uint8_t *)"GET /one/ HTTP\r\n"
}
SigGroupBuild(de_ctx);
- //PatternMatchPrepare(mpm_ctx, MPM_B2G);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx,(void *)&det_ctx);
SigMatchSignatures(&th_v, de_ctx, det_ctx, p1);
SigGroupCleanup(de_ctx);
SigCleanSignatures(de_ctx);
- DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
- //PatternMatchDestroy(mpm_ctx);
+ if (det_ctx != NULL)
+ DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
end:
SCFree(p1);
if (p2 == NULL)
return 0;
ThreadVars th_v;
- DetectEngineThreadCtx *det_ctx;
+ DetectEngineThreadCtx *det_ctx = NULL;
int result = 1;
uint8_t *buf = (uint8_t *)"GET /one/ HTTP\r\n"
}
SigGroupBuild(de_ctx);
- //PatternMatchPrepare(mpm_ctx, MPM_B2G);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx,(void *)&det_ctx);
SigMatchSignatures(&th_v, de_ctx, det_ctx, p1);
SigGroupCleanup(de_ctx);
SigCleanSignatures(de_ctx);
- DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
- //PatternMatchDestroy(mpm_ctx);
+ if (det_ctx != NULL)
+ DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
end:
SCFree(p1);
if (p2 == NULL)
return 0;
ThreadVars th_v;
- DetectEngineThreadCtx *det_ctx;
+ DetectEngineThreadCtx *det_ctx = NULL;
int result = 1;
uint8_t *buf = (uint8_t *)"GET /one/ HTTP/1.0\r\n"
SigGroupCleanup(de_ctx);
SigCleanSignatures(de_ctx);
- DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
+ if (det_ctx != NULL)
+ DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
end:
SCFree(p1);
}
SigGroupBuild(de_ctx);
- //PatternMatchPrepare(mpm_ctx, MPM_B2G);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx,(void *)&det_ctx);
SigMatchSignatures(&th_v, de_ctx, det_ctx, p1);
SigGroupCleanup(de_ctx);
SigCleanSignatures(de_ctx);
- DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
- //PatternMatchDestroy(mpm_ctx);
+ if (det_ctx != NULL)
+ DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
end:
SCFree(p1);
if (p2 == NULL)
return 0;
ThreadVars th_v;
- DetectEngineThreadCtx *det_ctx;
+ DetectEngineThreadCtx *det_ctx = NULL;
int result = 1;
uint8_t *buf = (uint8_t *)"GET /one/ HTTP/1.0\r\n"
}
SigGroupBuild(de_ctx);
- //PatternMatchPrepare(mpm_ctx, MPM_B2G);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx,(void *)&det_ctx);
SigMatchSignatures(&th_v, de_ctx, det_ctx, p1);
SigGroupCleanup(de_ctx);
SigCleanSignatures(de_ctx);
- DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
- //PatternMatchDestroy(mpm_ctx);
+ if (det_ctx != NULL)
+ DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
end:
SCFree(p1);
if (p2 == NULL)
return 0;
ThreadVars th_v;
- DetectEngineThreadCtx *det_ctx;
+ DetectEngineThreadCtx *det_ctx = NULL;
int result = 1;
uint8_t *buf = (uint8_t *)"GET /one/ HTTP/1.0\r\n"
}
SigGroupBuild(de_ctx);
- //PatternMatchPrepare(mpm_ctx, MPM_B2G);
DetectEngineThreadCtxInit(&th_v, (void *)de_ctx,(void *)&det_ctx);
SigMatchSignatures(&th_v, de_ctx, det_ctx, p1);
SigGroupCleanup(de_ctx);
SigCleanSignatures(de_ctx);
- DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
- //PatternMatchDestroy(mpm_ctx);
+ if (det_ctx != NULL)
+ DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
end:
SCFree(p1);
if (p1 == NULL)
return 0;
ThreadVars th_v;
- DetectEngineThreadCtx *det_ctx;
+ DetectEngineThreadCtx *det_ctx = NULL;
int result = 1;
uint8_t raw_eth[] = {
0x00, 0x00, 0x03, 0x04, 0x00, 0x06, 0x00,
SigGroupCleanup(de_ctx);
SigCleanSignatures(de_ctx);
- DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
+ if (det_ctx != NULL)
+ DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
end:
if (p1 == NULL)
return 0;
ThreadVars th_v;
- DetectEngineThreadCtx *det_ctx;
+ DetectEngineThreadCtx *det_ctx = NULL;
int result = 1;
uint8_t raw_eth[] = {
0x00, 0x00, 0x03, 0x04, 0x00, 0x06, 0x00,
cleanup:
SigGroupCleanup(de_ctx);
SigCleanSignatures(de_ctx);
-
- DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
+ if (det_ctx != NULL)
+ DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
end: