summaryrefslogtreecommitdiff
path: root/Kernel/Syscalls/unveil.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-09-06 19:24:54 +0200
committerAndreas Kling <kling@serenityos.org>2021-09-06 19:25:36 +0200
commit56a2594de7fdcd1b0e8c2a20832ba4a14fa20501 (patch)
treec5da30fe55661c18aad37208fc073d5180793f8f /Kernel/Syscalls/unveil.cpp
parent69b9b2888cea47393461799746e80a04bdcae4d1 (diff)
downloadserenity-56a2594de7fdcd1b0e8c2a20832ba4a14fa20501.zip
Kernel: Make KString factories return KResultOr + use TRY() everywhere
There are a number of places that don't have an error propagation path right now, so I've added FIXME's about that.
Diffstat (limited to 'Kernel/Syscalls/unveil.cpp')
-rw-r--r--Kernel/Syscalls/unveil.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/Kernel/Syscalls/unveil.cpp b/Kernel/Syscalls/unveil.cpp
index ebdc915649..ae06747678 100644
--- a/Kernel/Syscalls/unveil.cpp
+++ b/Kernel/Syscalls/unveil.cpp
@@ -86,9 +86,7 @@ KResultOr<FlatPtr> Process::sys$unveil(Userspace<const Syscall::SC_unveil_params
new_unveiled_path = TRY(custody_or_error.value()->try_serialize_absolute_path());
} else if (custody_or_error.error() == ENOENT && parent_custody && (new_permissions & UnveilAccess::CreateOrRemove)) {
auto parent_custody_path = TRY(parent_custody->try_serialize_absolute_path());
- new_unveiled_path = KLexicalPath::try_join(parent_custody_path->view(), KLexicalPath::basename(path->view()));
- if (!new_unveiled_path)
- return ENOMEM;
+ new_unveiled_path = TRY(KLexicalPath::try_join(parent_custody_path->view(), KLexicalPath::basename(path->view())));
} else {
// FIXME Should this be EINVAL?
return custody_or_error.error();