unittests: clean up memory for app-layer proto tests

pull/14025/head
Victor Julien 1 month ago committed by Victor Julien
parent b85cd8030f
commit bcd6481d80

@ -3227,19 +3227,16 @@ static int AppLayerProtoDetectTest16(void)
}
result = 1;
end:
UTHFreePackets(&p, 1);
UTHFreeFlow(f);
if (alp_tctx != NULL)
AppLayerParserThreadCtxFree(alp_tctx);
if (det_ctx != NULL)
DetectEngineThreadCtxDeinit(&tv, det_ctx);
if (de_ctx != NULL)
SigGroupCleanup(de_ctx);
if (de_ctx != NULL)
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
UTHFreePackets(&p, 1);
UTHFreeFlow(f);
StatsThreadCleanup(&tv);
return result;
}
@ -3320,19 +3317,16 @@ static int AppLayerProtoDetectTest17(void)
result = 1;
end:
UTHFreePackets(&p, 1);
UTHFreeFlow(f);
if (alp_tctx != NULL)
AppLayerParserThreadCtxFree(alp_tctx);
if (det_ctx != NULL)
DetectEngineThreadCtxDeinit(&tv, det_ctx);
if (de_ctx != NULL)
SigGroupCleanup(de_ctx);
if (de_ctx != NULL)
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
UTHFreePackets(&p, 1);
UTHFreeFlow(f);
StatsThreadCleanup(&tv);
return result;
}
@ -3412,19 +3406,16 @@ static int AppLayerProtoDetectTest18(void)
result = 1;
end:
UTHFreePackets(&p, 1);
UTHFreeFlow(f);
if (alp_tctx != NULL)
AppLayerParserThreadCtxFree(alp_tctx);
if (det_ctx != NULL)
DetectEngineThreadCtxDeinit(&tv, det_ctx);
if (de_ctx != NULL)
SigGroupCleanup(de_ctx);
if (de_ctx != NULL)
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
UTHFreePackets(&p, 1);
UTHFreeFlow(f);
StatsThreadCleanup(&tv);
return result;
}
@ -3496,18 +3487,16 @@ static int AppLayerProtoDetectTest19(void)
result = 1;
end:
UTHFreePackets(&p, 1);
UTHFreeFlow(f);
if (alp_tctx != NULL)
AppLayerParserThreadCtxFree(alp_tctx);
if (det_ctx != NULL)
DetectEngineThreadCtxDeinit(&tv, det_ctx);
if (de_ctx != NULL)
SigGroupCleanup(de_ctx);
if (de_ctx != NULL)
DetectEngineCtxFree(de_ctx);
StreamTcpFreeConfig(true);
UTHFreePackets(&p, 1);
UTHFreeFlow(f);
StatsThreadCleanup(&tv);
return result;
}

Loading…
Cancel
Save