mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
Kernel: Avoid an allocation in sys$poll
This commit is contained in:
parent
277f333b2b
commit
7dc77bd833
Notes:
sideshowbarker
2024-07-18 17:45:35 +09:00
Author: https://github.com/gunnarbeutner
Commit: 7dc77bd833
Pull-request: https://github.com/SerenityOS/serenity/pull/7246
Reviewed-by: https://github.com/tomuta
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue