diff --git a/ELFLoader/ExecSpace.cpp b/ELFLoader/ExecSpace.cpp index 33172c29d6f..e15805ac864 100644 --- a/ELFLoader/ExecSpace.cpp +++ b/ELFLoader/ExecSpace.cpp @@ -12,6 +12,10 @@ ExecSpace::ExecSpace() ExecSpace::~ExecSpace() { + if (!hookableAlloc) { + for (auto& area : m_areas) + kfree(area->memory); + } } #ifdef SERENITY