1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 08:58:11 +00:00

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

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());
}
}