From 8d3b819daf659ee9ce7628d3ddd1e7ca3876fcf5 Mon Sep 17 00:00:00 2001 From: Brian Gianforcaro Date: Sun, 1 Aug 2021 02:30:52 -0700 Subject: Kernel: Handle OOM from DoubleBuffer creation in FIFO creation --- Kernel/FileSystem/FIFO.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Kernel/FileSystem/FIFO.h') diff --git a/Kernel/FileSystem/FIFO.h b/Kernel/FileSystem/FIFO.h index 39ef6b8042..e9c62ce232 100644 --- a/Kernel/FileSystem/FIFO.h +++ b/Kernel/FileSystem/FIFO.h @@ -24,7 +24,7 @@ public: Writer }; - static NonnullRefPtr create(uid_t); + static RefPtr try_create(uid_t); virtual ~FIFO() override; uid_t uid() const { return m_uid; } @@ -49,11 +49,11 @@ private: virtual StringView class_name() const override { return "FIFO"; } virtual bool is_fifo() const override { return true; } - explicit FIFO(uid_t); + explicit FIFO(uid_t, NonnullOwnPtr buffer); unsigned m_writers { 0 }; unsigned m_readers { 0 }; - DoubleBuffer m_buffer; + NonnullOwnPtr m_buffer; uid_t m_uid { 0 }; -- cgit v1.2.3