mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:38:11 +00:00
Kernel: Add missing error check after Process::try_create()
As the name now suggests, this API can fail. :^)
This commit is contained in:
parent
5e2e17c38c
commit
cfc1a628d5
1 changed files with 1 additions and 1 deletions
|
@ -157,7 +157,7 @@ RefPtr<Process> Process::create_user_process(RefPtr<Thread>& first_thread, const
|
|||
cwd = VirtualFileSystem::the().root_custody();
|
||||
|
||||
auto process = Process::try_create(first_thread, parts.take_last(), uid, gid, parent_pid, false, move(cwd), nullptr, tty);
|
||||
if (!first_thread)
|
||||
if (!process || !first_thread)
|
||||
return {};
|
||||
if (!process->m_fds.try_resize(process->m_fds.max_open())) {
|
||||
first_thread = nullptr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue