g++ 12 unit test build fix. (#476)

test_random_allocation, g++ sees the removal from the list of the test case
as UAF.
This commit is contained in:
David CARLIER
2022-03-07 11:29:59 +00:00
committed by GitHub
parent 611d4dc617
commit a602643fd2

View File

@@ -134,8 +134,8 @@ void test_random_allocation()
auto& cell = objects[index % count];
if (cell != nullptr)
{
alloc.dealloc(cell);
allocated.erase(cell);
alloc.dealloc(cell);
cell = nullptr;
alloc_count--;
}