Close fds to avoid fd leakage.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1768
This commit is contained in:
Julian Seward 2003-07-20 22:39:58 +00:00
parent 183e356f9d
commit 3473810abb

View File

@ -366,8 +366,9 @@ int main (int argc, char** argv)
if (res == 0) {
/* the connection has been closed. */
close(conn_pollfd[i].fd);
/* this fd has been closed or otherwise gone bad; forget
about it. */
about it. */
for (k = 0; k < M_CONNECTIONS; k++)
if (conn_fd[k] == conn_pollfd[i].fd)
break;