diff options
author | Gunnar Beutner <gbeutner@serenityos.org> | 2021-05-14 09:39:08 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-05-19 22:51:42 +0200 |
commit | 7dc77bd833ea245dba8d1857f66ee05493192cad (patch) | |
tree | 8375360f2a34ed7bb07c711d9979440058fde66f /Kernel | |
parent | 277f333b2bbf2ca24d0d4c7695edbaed21dc0ba3 (diff) | |
download | serenity-7dc77bd833ea245dba8d1857f66ee05493192cad.zip |
Kernel: Avoid an allocation in sys$poll
Diffstat (limited to 'Kernel')
-rw-r--r-- | Kernel/Syscalls/select.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Syscalls/select.cpp b/Kernel/Syscalls/select.cpp index f38946f211..e0d7bb7411 100644 --- a/Kernel/Syscalls/select.cpp +++ b/Kernel/Syscalls/select.cpp @@ -150,7 +150,7 @@ KResultOr<int> Process::sys$poll(Userspace<const Syscall::SC_poll_params*> user_ if (params.sigmask && !copy_from_user(&sigmask, params.sigmask)) return EFAULT; - Vector<pollfd> fds_copy; + Vector<pollfd, FD_SETSIZE> fds_copy; if (params.nfds > 0) { Checked nfds_checked = sizeof(pollfd); nfds_checked *= params.nfds; |