From 0c9f51498a56bc7368f7207baf74462ab02933a9 Mon Sep 17 00:00:00 2001 From: Pablo Rincon Date: Tue, 22 Dec 2009 15:37:53 +0100 Subject: [PATCH] Small fixes at unittest helper functions and TestBidirec03 --- src/detect-parse.c | 3 ++- src/util-unittest-helper.c | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/detect-parse.c b/src/detect-parse.c index 485fc93f84..b6a736960f 100644 --- a/src/detect-parse.c +++ b/src/detect-parse.c @@ -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; } diff --git a/src/util-unittest-helper.c b/src/util-unittest-helper.c index 5c6832f072..3774157b04 100644 --- a/src/util-unittest-helper.c +++ b/src/util-unittest-helper.c @@ -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; }