From d2cee9cbf69aa43a92b41c6fb76110273cb7c82e Mon Sep 17 00:00:00 2001 From: Brian Gianforcaro Date: Tue, 27 Jul 2021 02:06:19 -0700 Subject: [PATCH] Kernel: Remove unused fd allocation from Process::sys$connect(..) --- Kernel/Syscalls/socket.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/Kernel/Syscalls/socket.cpp b/Kernel/Syscalls/socket.cpp index 85719be2cf..6afccea00b 100644 --- a/Kernel/Syscalls/socket.cpp +++ b/Kernel/Syscalls/socket.cpp @@ -153,9 +153,6 @@ KResultOr Process::sys$accept4(Userspace Process::sys$connect(int sockfd, Userspace user_address, socklen_t user_address_size) { VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this) - int fd = m_fds.allocate(); - if (fd < 0) - return fd; auto description = fds().file_description(sockfd); if (!description) return EBADF;