ExecSpace should free its own allocations on destruction.

If hookableAlloc was used, we don't free anything. That's the client's
responsibility.
This commit is contained in:
Andreas Kling 2018-10-23 15:31:23 +02:00
parent ccd15e0590
commit 1c1d0f5362
Notes: sideshowbarker 2024-07-19 18:40:04 +09:00

View file

@ -12,6 +12,10 @@ ExecSpace::ExecSpace()
ExecSpace::~ExecSpace()
{
if (!hookableAlloc) {
for (auto& area : m_areas)
kfree(area->memory);
}
}
#ifdef SERENITY