Skip to content

Commit 7f64758

Browse files
committed
lib/sockets: make sure to use libc close in fd manager
1 parent 33439bb commit 7f64758

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/sockets/manage_fd.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@ int flextcp_fd_salloc(struct socket **ps)
7676
/* no more file handles available */
7777
if (fd >= MAXSOCK) {
7878
free(s);
79-
/* TODO: enusure this is the libc close */
80-
close(fd);
79+
tas_libc_close(fd);
8180
errno = EMFILE;
8281
return -1;
8382
}
@@ -161,8 +160,7 @@ void flextcp_fd_close(int fd)
161160

162161
fhs[fd].type = FH_UNUSED;
163162
MEM_BARRIER();
164-
/* TODO: enusure this is the libc close */
165-
close(fd);
163+
tas_libc_close(fd);
166164
}
167165

168166
/* do the tas-internal part of duping oldfd to newfd, after the linux fds have

0 commit comments

Comments
 (0)