summaryrefslogtreecommitdiff
path: root/Source/Kernel/TaskManager/Process.class.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Kernel/TaskManager/Process.class.cpp')
-rw-r--r--Source/Kernel/TaskManager/Process.class.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/Kernel/TaskManager/Process.class.cpp b/Source/Kernel/TaskManager/Process.class.cpp
index cf8f00a..9fdad96 100644
--- a/Source/Kernel/TaskManager/Process.class.cpp
+++ b/Source/Kernel/TaskManager/Process.class.cpp
@@ -42,6 +42,7 @@ Process::Process(String cmdline, u32int uid) {
m_state = P_RUNNING;
m_uid = uid;
m_vt = Task::currProcess()->getVirtualTerminal();
+ m_fileDescriptors = 0;
//Create page directory and user heap
m_pagedir = new PageDirectory(kernelPageDirectory);
m_pagedir->switchTo();
@@ -65,7 +66,7 @@ void Process::exit() {
iter->v()->close(false);
delete iter->v();
}
- delete m_fileDescriptors; //Will recursively delete whole list
+ if (m_fileDescriptors != 0) delete m_fileDescriptors; //Will recursively delete whole list
m_state = P_FINISHED;
}