summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixSock.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-05-24 10:05:50 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-05-24 10:05:50 (GMT)
commit3186e522afae18a8fe8e1513d4a9e27500486613 (patch)
treeaab209c5964341792f32189bac2d3ddc546f2328 /unix/tclUnixSock.c
parente859f7d69ec73922d1dbdfaa19df6e7f0b82c593 (diff)
parent78bbbde35c3f53764827e54afe963af4ea244aa4 (diff)
downloadtcl-3186e522afae18a8fe8e1513d4a9e27500486613.zip
tcl-3186e522afae18a8fe8e1513d4a9e27500486613.tar.gz
tcl-3186e522afae18a8fe8e1513d4a9e27500486613.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;