summaryrefslogtreecommitdiff
path: root/ELFLoader/ExecSpace.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ELFLoader/ExecSpace.cpp')
-rw-r--r--ELFLoader/ExecSpace.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/ELFLoader/ExecSpace.cpp b/ELFLoader/ExecSpace.cpp
index 33172c29d6..e15805ac86 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