1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 07:45:07 +00:00

Kernel: Remove unused fd allocation from Process::sys$connect(..)

This commit is contained in:
Brian Gianforcaro 2021-07-27 02:06:19 -07:00 committed by Andreas Kling
parent 9252addf55
commit d2cee9cbf6

View file

@ -153,9 +153,6 @@ KResultOr<FlatPtr> Process::sys$accept4(Userspace<const Syscall::SC_accept4_para
KResultOr<FlatPtr> Process::sys$connect(int sockfd, Userspace<const sockaddr*> 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;