summaryrefslogtreecommitdiff
path: root/Kernel/Process.cpp
diff options
context:
space:
mode:
authorIdan Horowitz <idan.horowitz@gmail.com>2022-02-13 21:21:14 +0200
committerAndreas Kling <kling@serenityos.org>2022-02-13 23:02:57 +0100
commitc8ab7bde3b9a75ec8b6706eda87daebc66624154 (patch)
treec4144cd0731dde8a37979378340360eb9d43f7c9 /Kernel/Process.cpp
parent98c20b65cc1e436e805f066bf2b007ebf0a798ec (diff)
downloadserenity-c8ab7bde3b9a75ec8b6706eda87daebc66624154.zip
Kernel: Use try_make_weak_ptr() instead of make_weak_ptr()
Diffstat (limited to 'Kernel/Process.cpp')
-rw-r--r--Kernel/Process.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp
index 0cbb1f9449..13e6076a86 100644
--- a/Kernel/Process.cpp
+++ b/Kernel/Process.cpp
@@ -266,7 +266,8 @@ ErrorOr<void> Process::attach_resources(NonnullOwnPtr<Memory::AddressSpace>&& pr
first_thread->detach();
}
- m_procfs_traits = TRY(ProcessProcFSTraits::try_create({}, *this));
+ auto weak_ptr = TRY(this->try_make_weak_ptr());
+ m_procfs_traits = TRY(ProcessProcFSTraits::try_create({}, move(weak_ptr)));
return {};
}