summaryrefslogtreecommitdiffhomepage
path: root/Private/Source
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlalelmahrouss@icloud.com>2024-02-05 15:21:26 +0100
committerAmlal El Mahrouss <amlalelmahrouss@icloud.com>2024-02-05 15:21:47 +0100
commitb3666c011a512d7758a8c095872241e8f3964850 (patch)
treefedd546a3179a9ee5cd2c498cf905559eb417b9a /Private/Source
parent81144dd05a7c01701c3bf7b04e345dccfef2bf82 (diff)
HCR-11: See below;
Bootloader: - Fix BFileReader on UEFI. Kernel: - Improve The scheduler and SMP manager. Signed-off-by: Amlal El Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'Private/Source')
-rw-r--r--Private/Source/ProcessManager.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/Private/Source/ProcessManager.cxx b/Private/Source/ProcessManager.cxx
index ea9ba1f5..af3fa351 100644
--- a/Private/Source/ProcessManager.cxx
+++ b/Private/Source/ProcessManager.cxx
@@ -133,8 +133,9 @@ void Process::Exit(Int32 exit_code) {
if (this->Ring != (Int32)ProcessSelector::kRingDriver &&
this->Ring != (Int32)ProcessSelector::kRingKernel) {
- ke_free_heap(this->Pool);
+ if (this->Pool) ke_free_heap(this->Pool);
+ this->Pool = nullptr;
this->PoolCursor = nullptr;
this->FreeMemory = kPoolMaxSz;
@@ -143,9 +144,11 @@ void Process::Exit(Int32 exit_code) {
//! Delete image if not done already.
if (this->Image) ke_delete_ke_heap(this->Image);
-
if (this->StackFrame) ke_delete_ke_heap((VoidPtr)this->StackFrame);
+ this->Image = nullptr;
+ this->StackFrame = nullptr;
+
ProcessManager::Shared().Leak().Remove(this->ProcessId);
}