mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-12 02:59:45 +00:00
Kernel: Handle allocation failure in ProcFS and friends
There were many places in which allocation failure was noticed but ignored.
This commit is contained in:
parent
134dbe2607
commit
748938ea59
Notes:
sideshowbarker
2024-07-18 05:42:35 +09:00
Author: https://github.com/sin-ack
Commit: 748938ea59
Pull-request: https://github.com/SerenityOS/serenity/pull/9410
Reviewed-by: https://github.com/awesomekling
8 changed files with 196 additions and 92 deletions
|
@ -90,7 +90,10 @@ KResultOr<FlatPtr> Process::sys$mount(Userspace<const Syscall::SC_mount_params*>
|
|||
|
||||
fs = Plan9FS::create(*description);
|
||||
} else if (fs_type == "proc"sv || fs_type == "ProcFS"sv) {
|
||||
fs = ProcFS::create();
|
||||
auto maybe_fs = ProcFS::try_create();
|
||||
if (maybe_fs.is_error())
|
||||
return maybe_fs.error();
|
||||
fs = maybe_fs.release_value();
|
||||
} else if (fs_type == "devpts"sv || fs_type == "DevPtsFS"sv) {
|
||||
fs = DevPtsFS::create();
|
||||
} else if (fs_type == "dev"sv || fs_type == "DevFS"sv) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue