1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:38:11 +00:00

Kernel: Rename VMObject::clone() => try_clone()

And fix an unsafe dereference in SharedInodeVMObject::try_clone()
to make it OOM-safe.
This commit is contained in:
Andreas Kling 2021-07-11 19:07:00 +02:00
parent d85bce57b3
commit f244a25f71
11 changed files with 13 additions and 13 deletions

View file

@ -14,7 +14,7 @@ RefPtr<PrivateInodeVMObject> PrivateInodeVMObject::try_create_with_inode(Inode&
return adopt_ref_if_nonnull(new (nothrow) PrivateInodeVMObject(inode, inode.size()));
}
RefPtr<VMObject> PrivateInodeVMObject::clone()
RefPtr<VMObject> PrivateInodeVMObject::try_clone()
{
return adopt_ref_if_nonnull(new (nothrow) PrivateInodeVMObject(*this));
}