Small fixes at unittest helper functions and TestBidirec03

remotes/origin/master-1.0.x
Pablo Rincon 16 years ago committed by Victor Julien
parent c80160b96d
commit 0c9f51498a

@ -1303,7 +1303,6 @@ int SigTestBidirec03 (void) {
FlowInitConfig(FLOW_QUIET);
Packet *p = UTHBuildPacketFromEth(rawpkt1_ether, sizeof(rawpkt1_ether));
FlowShutdown();
if (p == NULL) {
SCLogDebug("Error building packet");
goto end;
@ -1314,7 +1313,9 @@ int SigTestBidirec03 (void) {
uint32_t results[3] = {1, 1, 1};
result = UTHCheckPacketMatchResults(p, sids, results, 1);
FlowShutdown();
end:
if (de_ctx != NULL) DetectEngineCtxFree(de_ctx);
return result;
}

@ -178,9 +178,7 @@ Packet *UTHBuildPacketFromEth(uint8_t *raw_eth, uint16_t pktsize) {
memset(&dtv, 0, sizeof(DecodeThreadVars));
memset(&th_v, 0, sizeof(th_v));
FlowInitConfig(FLOW_QUIET);
DecodeEthernet(&th_v, &dtv, p, raw_eth, pktsize, NULL);
FlowShutdown();
return p;
}

Loading…
Cancel
Save