hostbits: test fixes

pull/2393/head
Victor Julien 9 years ago
parent 8831e5b375
commit 56ff853e73

@ -547,8 +547,7 @@ static int HostBitsTestSig01(void)
"\r\n";
uint16_t buflen = strlen((char *)buf);
Packet *p = SCMalloc(SIZE_OF_PACKET);
if (unlikely(p == NULL))
return 0;
FAIL_IF_NULL(p);
Signature *s = NULL;
ThreadVars th_v;
DetectEngineThreadCtx *det_ctx = NULL;
@ -577,19 +576,8 @@ static int HostBitsTestSig01(void)
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
if (de_ctx != NULL) {
SigGroupCleanup(de_ctx);
SigCleanSignatures(de_ctx);
}
if (det_ctx != NULL) {
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
}
if (de_ctx != NULL) {
DetectEngineCtxFree(de_ctx);
}
HostBitsTestShutdown();
SCFree(p);
@ -637,8 +625,6 @@ static int HostBitsTestSig02(void)
"alert ip any any -> any any (hostbits:toggle,abc,dst; content:\"GET \"; sid:5;)");
FAIL_IF_NULL(s);
SigGroupCleanup(de_ctx);
SigCleanSignatures(de_ctx);
DetectEngineCtxFree(de_ctx);
PASS;
}

Loading…
Cancel
Save