summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixSock.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2012-06-21 21:36:48 (GMT)
committerdgp <dgp@users.sourceforge.net>2012-06-21 21:36:48 (GMT)
commit357b7ce73369bce4e0b88aaa87e0b8a2c0eaa853 (patch)
tree3987f89806f1e9cd9163eaf0f87a53b55d9d7a66 /unix/tclUnixSock.c
parentfeab50ce27318c0af008498d86f1e5fa490a4e80 (diff)
parent607975b5dcc8af44e0fe65ab9ca787ed659e79bd (diff)
downloadtcl-357b7ce73369bce4e0b88aaa87e0b8a2c0eaa853.zip
tcl-357b7ce73369bce4e0b88aaa87e0b8a2c0eaa853.tar.gz
tcl-357b7ce73369bce4e0b88aaa87e0b8a2c0eaa853.tar.bz2
merge trunk
Diffstat (limited to 'unix/tclUnixSock.c')
-rw-r--r--unix/tclUnixSock.c3
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;