mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-17 16:28:06 +03: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: https://github.com/SerenityOS/serenity/commit/7dc77bd833e Pull-request: https://github.com/SerenityOS/serenity/pull/7246 Reviewed-by: https://github.com/tomuta
@ -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…
Reference in New Issue
Block a user