summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom <tomut@yahoo.com>2021-02-07 14:13:30 -0700
committerAndreas Kling <kling@serenityos.org>2021-02-07 22:25:15 +0100
commitb22740c08ec45a2126897b20e871e2c66960c9f8 (patch)
tree1c559f8b020b8233ef29a77955f91c6d73c6f705
parentf74e31c74db3f9464e027eabb37e26f82c529543 (diff)
downloadserenity-b22740c08ec45a2126897b20e871e2c66960c9f8.zip
Kernel: Use KResultOr::release_value in Process::create_kernel_thread
This should avoid an unneccessary reference bump.
-rw-r--r--Kernel/Process.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp
index e61a79d36e..9829f6e925 100644
--- a/Kernel/Process.cpp
+++ b/Kernel/Process.cpp
@@ -811,7 +811,7 @@ RefPtr<Thread> Process::create_kernel_thread(void (*entry)(void*), void* entry_d
if (thread_or_error.is_error())
return {};
- auto& thread = thread_or_error.value();
+ auto thread = thread_or_error.release_value();
thread->set_name(name);
thread->set_affinity(affinity);
thread->set_priority(priority);