unittests: check for flow memuse

pull/5279/head
Victor Julien 5 years ago
parent f50c7b6d11
commit e0aa7c1dbc

@ -1053,6 +1053,7 @@ cleanup:
uint8_t proto_map = FlowGetProtoMapping(f->proto);
FlowClearMemory(f, proto_map);
FLOW_DESTROY(f);
FlowFree(f);
end:
FlowShutdown();
HostShutdown();
@ -1199,6 +1200,7 @@ cleanup:
uint8_t proto_map = FlowGetProtoMapping(f->proto);
FlowClearMemory(f, proto_map);
FLOW_DESTROY(f);
FlowFree(f);
end:
FlowShutdown();
HostShutdown();
@ -1341,6 +1343,7 @@ cleanup:
uint8_t proto_map = FlowGetProtoMapping(f->proto);
FlowClearMemory(f, proto_map);
FLOW_DESTROY(f);
FlowFree(f);
end:
FlowShutdown();
HostShutdown();
@ -1484,6 +1487,7 @@ cleanup:
uint8_t proto_map = FlowGetProtoMapping(f->proto);
FlowClearMemory(f, proto_map);
FLOW_DESTROY(f);
FlowFree(f);
end:
FlowShutdown();
HostShutdown();

@ -525,7 +525,7 @@ Flow *UTHBuildFlow(int family, const char *src, const char *dst, Port sp, Port d
void UTHFreeFlow(Flow *flow)
{
if (flow != NULL) {
FlowFree(flow);
SCFree(flow);//FlowFree(flow);
}
}

@ -217,6 +217,10 @@ uint32_t UtRunTests(const char *regex_arg)
printf("STREAM MEMORY IN USE %"PRIu64"\n", StreamTcpMemuseCounter());
ret = 0;
}
if (FlowGetMemuse() != 0) {
printf("FLOW MEMORY IN USE %"PRIu64"\n", FlowGetMemuse());
ret = 0;
}
if (StreamTcpReassembleMemuseGlobalCounter() != 0) {
printf("STREAM REASSEMBLY MEMORY IN USE %"PRIu64"\n", StreamTcpReassembleMemuseGlobalCounter());

Loading…
Cancel
Save