From a525d0271c087000dfbf04a8fa5865e826ac7f5e Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 15 Jan 2021 15:13:17 +0100 Subject: [PATCH] Kernel: Fix bogus negation of alloc_fd() error in sys$anon_create() Thanks to Idan for spotting this! --- Kernel/Syscalls/anon_create.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kernel/Syscalls/anon_create.cpp b/Kernel/Syscalls/anon_create.cpp index fcfb268e32..bc2fbd33c1 100644 --- a/Kernel/Syscalls/anon_create.cpp +++ b/Kernel/Syscalls/anon_create.cpp @@ -38,7 +38,7 @@ int Process::sys$anon_create(size_t size, int options) int new_fd = alloc_fd(); if (new_fd < 0) - return -new_fd; + return new_fd; auto vmobject = AnonymousVMObject::create_with_size(size, AllocationStrategy::Reserve); if (!vmobject)