summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2016-04-08 13:27:57 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2016-04-08 13:27:57 (GMT)
commitdaaf750d95e22d23e47f846f89b0d7033b4eb0bd (patch)
treeff5147d14e25f27e1adf5eba7aa2468a3b1a7317
parenta46470f9963dd69ba76c63ef2fcb438022ae69bb (diff)
downloadtcl-daaf750d95e22d23e47f846f89b0d7033b4eb0bd.zip
tcl-daaf750d95e22d23e47f846f89b0d7033b4eb0bd.tar.gz
tcl-daaf750d95e22d23e47f846f89b0d7033b4eb0bd.tar.bz2
Fix [2538f373ffc78d6dba9c3d973c147a84fdd9bbd8|2538f373ffc78d6d]: crash in Tcl_OpenTcpServer() on Windows
-rw-r--r--win/tclWinSock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/win/tclWinSock.c b/win/tclWinSock.c
index a022ed5..da2e60a 100644
--- a/win/tclWinSock.c
+++ b/win/tclWinSock.c
@@ -2061,7 +2061,6 @@ Tcl_OpenTcpServer(
char channelName[SOCK_CHAN_LENGTH];
u_long flag = 1; /* Indicates nonblocking mode. */
const char *errorMsg = NULL;
- ThreadSpecificData *tsdPtr = TclThreadDataKeyGet(&dataKey);
if (TclpHasSockets(interp) != TCL_OK) {
return NULL;
@@ -2177,6 +2176,7 @@ error:
}
if (statePtr != NULL) {
+ ThreadSpecificData *tsdPtr = TclThreadDataKeyGet(&dataKey);
statePtr->acceptProc = acceptProc;
statePtr->acceptProcData = acceptProcData;