diff options
-rw-r--r-- | unix/tclUnixSock.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/unix/tclUnixSock.c b/unix/tclUnixSock.c index e48cc2b..12e5a9a 100644 --- a/unix/tclUnixSock.c +++ b/unix/tclUnixSock.c @@ -545,6 +545,9 @@ TcpCloseProc( */ for (fds = &statePtr->fds; fds != NULL; fds = fds->next) { + if (fds->fd < 0) { + continue; + } Tcl_DeleteFileHandler(fds->fd); if (close(fds->fd) < 0) { errorCode = errno; |