mirror of
https://github.com/SerenityOS/serenity
synced 2024-09-06 08:56:40 +00:00
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:
parent
ccd15e0590
commit
1c1d0f5362
|
@ -12,6 +12,10 @@ ExecSpace::ExecSpace()
|
||||||
|
|
||||||
ExecSpace::~ExecSpace()
|
ExecSpace::~ExecSpace()
|
||||||
{
|
{
|
||||||
|
if (!hookableAlloc) {
|
||||||
|
for (auto& area : m_areas)
|
||||||
|
kfree(area->memory);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef SERENITY
|
#ifdef SERENITY
|
||||||
|
|
Loading…
Reference in a new issue