summaryrefslogtreecommitdiff
path: root/Kernel/VM/AnonymousVMObject.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-07-11 19:07:00 +0200
committerAndreas Kling <kling@serenityos.org>2021-07-11 19:09:02 +0200
commitf244a25f71e1d445558aed26a0042714c4add137 (patch)
tree09c8a240f7eb348b197df130393506e0b3a3b644 /Kernel/VM/AnonymousVMObject.cpp
parentd85bce57b3168c792422f8392cfaee098829de94 (diff)
downloadserenity-f244a25f71e1d445558aed26a0042714c4add137.zip
Kernel: Rename VMObject::clone() => try_clone()
And fix an unsafe dereference in SharedInodeVMObject::try_clone() to make it OOM-safe.
Diffstat (limited to 'Kernel/VM/AnonymousVMObject.cpp')
-rw-r--r--Kernel/VM/AnonymousVMObject.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/VM/AnonymousVMObject.cpp b/Kernel/VM/AnonymousVMObject.cpp
index 4f43684f96..c218d77121 100644
--- a/Kernel/VM/AnonymousVMObject.cpp
+++ b/Kernel/VM/AnonymousVMObject.cpp
@@ -13,7 +13,7 @@
namespace Kernel {
-RefPtr<VMObject> AnonymousVMObject::clone()
+RefPtr<VMObject> AnonymousVMObject::try_clone()
{
// We need to acquire our lock so we copy a sane state
ScopedSpinLock lock(m_lock);