summaryrefslogtreecommitdiff
path: root/Kernel/Process.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-05-31 07:19:54 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-05-31 07:19:54 +0200
commitd58eb3bf2154ae85bdc131030873d84b26e88d7d (patch)
tree4bc5c5d8a91c5b8a278735667b181071c4253530 /Kernel/Process.cpp
parente33dadbdd6a93f94b2e228b183a666b1d18b5ed1 (diff)
downloadserenity-d58eb3bf2154ae85bdc131030873d84b26e88d7d.zip
Kernel: Process finalization should release cwd and executable custodies.
Since Process destruction happens with interrupts disabled, it's not safe to still hold custodies at that point. Drop them in finalization.
Diffstat (limited to 'Kernel/Process.cpp')
-rw-r--r--Kernel/Process.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp
index 42b9636cc5..4ae3d67f76 100644
--- a/Kernel/Process.cpp
+++ b/Kernel/Process.cpp
@@ -2010,6 +2010,8 @@ void Process::finalize()
m_fds.clear();
m_tty = nullptr;
+ m_executable = nullptr;
+ m_cwd = nullptr;
disown_all_shared_buffers();
{
InterruptDisabler disabler;