mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-05 23:59:49 +00:00
Kernel: Handle OOM from DoubleBuffer creation in FIFO creation
This commit is contained in:
parent
15cd5d324c
commit
8d3b819daf
Notes:
sideshowbarker
2024-07-18 07:31:59 +09:00
Author: https://github.com/bgianfo
Commit: 8d3b819daf
Pull-request: https://github.com/SerenityOS/serenity/pull/9154
Reviewed-by: https://github.com/alimpfard ✅
4 changed files with 25 additions and 16 deletions
|
@ -20,7 +20,9 @@ KResultOr<FlatPtr> Process::sys$pipe(int pipefd[2], int flags)
|
|||
return EINVAL;
|
||||
|
||||
u32 fd_flags = (flags & O_CLOEXEC) ? FD_CLOEXEC : 0;
|
||||
auto fifo = FIFO::create(uid());
|
||||
auto fifo = FIFO::try_create(uid());
|
||||
if (!fifo)
|
||||
return ENOMEM;
|
||||
|
||||
auto open_reader_result = fifo->open_direction(FIFO::Direction::Reader);
|
||||
if (open_reader_result.is_error())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue