mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-12 02:59:45 +00:00
Kernel: Make AddressSpace::find_regions_intersecting OOM-fallible
This commit is contained in:
parent
dab73d6d23
commit
a6f0ab358a
Notes:
sideshowbarker
2024-07-17 20:12:10 +09:00
Author: https://github.com/IdanHo
Commit: a6f0ab358a
Pull-request: https://github.com/SerenityOS/serenity/pull/12128
Reviewed-by: https://github.com/bgianfo ✅
4 changed files with 6 additions and 6 deletions
|
@ -323,7 +323,7 @@ ErrorOr<FlatPtr> Process::sys$mprotect(Userspace<void*> addr, size_t size, int p
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (const auto& regions = address_space().find_regions_intersecting(range_to_mprotect); regions.size()) {
|
||||
if (const auto& regions = TRY(address_space().find_regions_intersecting(range_to_mprotect)); regions.size()) {
|
||||
size_t full_size_found = 0;
|
||||
// Check that all intersecting regions are compatible.
|
||||
for (const auto* region : regions) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue