mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-21 02:08:12 +03:00
Kernel: Make master TLS region WeakPtr construction OOM-fallible
This commit is contained in:
parent
b305ee8692
commit
e384f62ee2
Notes:
sideshowbarker
2024-07-17 18:52:18 +09:00
Author: https://github.com/IdanHo Commit: https://github.com/SerenityOS/serenity/commit/e384f62ee2 Pull-request: https://github.com/SerenityOS/serenity/pull/12507
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user