diff -u -r1.94 tclIO.c
--- generic/tclIO.c     26 Aug 2005 22:11:16 -0000      1.94
+++ generic/tclIO.c     3 Oct 2005 12:44:03 -0000
@@ -201,7 +201,6 @@
     for (statePtr = tsdPtr->firstCSPtr; statePtr != (ChannelState *) NULL;
            statePtr = nextCSPtr) {
        chanPtr = statePtr->topChanPtr;
-       nextCSPtr = statePtr->nextCSPtr;

        /*
         * Set the channel back into blocking mode to ensure that we wait for
@@ -261,6 +260,12 @@
            chanPtr->instanceData = (ClientData) NULL;
            statePtr->flags |= CHANNEL_DEAD;
        }
+
+       /*
+        * We look for the next pointer now in case we had one closed on up during
+        * the current channel's closeproc. (eg: rechan extension). [PT]
+        */
+       nextCSPtr = statePtr->nextCSPtr;
     }
     TclpFinalizePipes();
 }
