mirror of
https://github.com/RGBCube/serenity
synced 2025-05-15 10:14:58 +00:00
Kernel: Handle OOM from DoubleBuffer creation in FIFO creation
This commit is contained in:
parent
15cd5d324c
commit
8d3b819daf
4 changed files with 25 additions and 16 deletions
|
@ -185,8 +185,11 @@ NonnullRefPtr<FIFO> Inode::fifo()
|
|||
VERIFY(metadata().is_fifo());
|
||||
|
||||
// FIXME: Release m_fifo when it is closed by all readers and writers
|
||||
if (!m_fifo)
|
||||
m_fifo = FIFO::create(metadata().uid);
|
||||
if (!m_fifo) {
|
||||
m_fifo = FIFO::try_create(metadata().uid);
|
||||
// FIXME: We need to be able to observe OOM here.
|
||||
VERIFY(!m_fifo.is_null());
|
||||
}
|
||||
|
||||
VERIFY(m_fifo);
|
||||
return *m_fifo;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue