Subject: Additional security for wrong pointer

From: oehhar <[email-masked]>
Date: Mon, 10 Mar 2014 16:59:09 +0000

---
 win/tclWinSock.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/win/tclWinSock.c b/win/tclWinSock.c
index 01a0f6f..d8b9129 100644
--- a/win/tclWinSock.c
+++ b/win/tclWinSock.c
@@ -1379,6 +1379,12 @@ CreateClientSocket(
 #ifdef DEBUGGING
 	    fprintf(stderr, "lastError: %d\n", Tcl_GetErrno());
 #endif
+	    /*
+	     * Clear the tsd socket list pointer if we did not wait for
+	     * the FD_CONNECT asyncroneously
+	     */
+	    tsdPtr->pendingSocketInfo = NULL;
+	    
 	    if (Tcl_GetErrno() == 0) {
 		goto out;
 	    }
-- 
cgit v0.12