summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-08-01 11:15:48 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-08-01 11:15:48 +0200
commit1a13145cb30babcf6ed2a8195c62b1ab5a12c3e6 (patch)
tree80eba341919d08d6a480eeaec90361b818ace9f0
parente8b3a539b4d7a300f076aaec7411112ec877f7dd (diff)
downloadserenity-1a13145cb30babcf6ed2a8195c62b1ab5a12c3e6.zip
Kernel: Remove unnecessary null check in Process::fork()
Found by PVS-Studio.
-rw-r--r--Kernel/Process.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp
index a4d1b41644..f0d58004cb 100644
--- a/Kernel/Process.cpp
+++ b/Kernel/Process.cpp
@@ -238,8 +238,6 @@ int Process::sys$gethostname(char* buffer, ssize_t size)
Process* Process::fork(RegisterDump& regs)
{
auto* child = new Process(String(m_name), m_uid, m_gid, m_pid, m_ring, m_cwd, m_executable, m_tty, this);
- if (!child)
- return nullptr;
#ifdef FORK_DEBUG
dbgprintf("fork: child=%p\n", child);