unittests: clean up memory for counter tests

pull/14025/head
Victor Julien 10 months ago committed by Victor Julien
parent 8a8509bf62
commit 10a6a0986e

@ -1399,15 +1399,13 @@ static int StatsTestCounterReg04(void)
static int StatsTestGetCntArray05(void)
{
ThreadVars tv;
int id;
memset(&tv, 0, sizeof(ThreadVars));
id = RegisterCounter("t1", "c1", &tv.perf_public_ctx);
int id = RegisterCounter("t1", "c1", &tv.perf_public_ctx);
FAIL_IF(id != 1);
int r = StatsGetAllCountersArray(NULL, &tv.perf_private_ctx);
FAIL_IF_NOT(r == -1);
StatsReleaseCounters(tv.perf_public_ctx.head);
StatsReleasePrivateThreadContext(&tv.perf_private_ctx);
PASS;
}

Loading…
Cancel
Save