Kernel: Make master TLS region WeakPtr construction OOM-fallible

This commit is contained in:
Idan Horowitz 2022-02-14 00:55:11 +02:00 committed by Andreas Kling
parent b305ee8692
commit e384f62ee2
Notes: sideshowbarker 2024-07-17 18:52:18 +09:00

View File

@ -110,7 +110,7 @@ ErrorOr<FlatPtr> Process::sys$fork(RegisterState& regs)
auto* child_region = TRY(child->address_space().add_region(move(region_clone)));
if (region == m_master_tls_region.unsafe_ptr())
child->m_master_tls_region = child_region;
child->m_master_tls_region = TRY(child_region->try_make_weak_ptr());
}
}