diff --git a/Kernel/Devices/TTY/MasterPTY.cpp b/Kernel/Devices/TTY/MasterPTY.cpp index 8a934e4c12a..7c262b6c7dc 100644 --- a/Kernel/Devices/TTY/MasterPTY.cpp +++ b/Kernel/Devices/TTY/MasterPTY.cpp @@ -16,12 +16,12 @@ namespace Kernel { -ErrorOr> MasterPTY::try_create(unsigned int index) +ErrorOr> MasterPTY::try_create(unsigned int index) { auto buffer = TRY(DoubleBuffer::try_create("MasterPTY: Buffer"sv)); - auto master_pty = TRY(adopt_nonnull_lock_ref_or_enomem(new (nothrow) MasterPTY(index, move(buffer)))); + auto master_pty = TRY(adopt_nonnull_ref_or_enomem(new (nothrow) MasterPTY(index, move(buffer)))); auto credentials = Process::current().credentials(); - auto slave_pty = TRY(adopt_nonnull_lock_ref_or_enomem(new (nothrow) SlavePTY(*master_pty, credentials->uid(), credentials->gid(), index))); + auto slave_pty = TRY(adopt_nonnull_ref_or_enomem(new (nothrow) SlavePTY(*master_pty, credentials->uid(), credentials->gid(), index))); master_pty->m_slave.with([&slave_pty](auto& slave) { slave = *slave_pty; }); diff --git a/Kernel/Devices/TTY/MasterPTY.h b/Kernel/Devices/TTY/MasterPTY.h index 4334056f67a..9d10d49c70d 100644 --- a/Kernel/Devices/TTY/MasterPTY.h +++ b/Kernel/Devices/TTY/MasterPTY.h @@ -16,7 +16,7 @@ class SlavePTY; class MasterPTY final : public CharacterDevice { public: - static ErrorOr> try_create(unsigned index); + static ErrorOr> try_create(unsigned index); virtual ~MasterPTY() override; unsigned index() const { return m_index; }