From 9d8482c3e8f0dd4cc050e1e9ec64a8ff51eba97e Mon Sep 17 00:00:00 2001 From: Brian Gianforcaro Date: Fri, 23 Jul 2021 09:31:08 -0700 Subject: [PATCH] Kernel: Use StringView when parsing pledges in sys$pledge(..) This ensures no potential allocation as in some cases the pledge char* could be promoted to AK::String by the compiler to execute the comparison. --- Kernel/Syscalls/pledge.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kernel/Syscalls/pledge.cpp b/Kernel/Syscalls/pledge.cpp index 4b83e4e5413..885b1317a1c 100644 --- a/Kernel/Syscalls/pledge.cpp +++ b/Kernel/Syscalls/pledge.cpp @@ -39,7 +39,7 @@ KResultOr Process::sys$pledge(Userspace