mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 00:25:12 +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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user