summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2016-04-08 13:30:12 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2016-04-08 13:30:12 (GMT)
commitac37feedcf44a41b5e00bdc945d4dfb48637d19c (patch)
treeb1560972b41713eaddad43147616cc6bb81d3bfb
parent13f94fc240d3b0a4284e2f8282557f5bbf59bc11 (diff)
parentdaaf750d95e22d23e47f846f89b0d7033b4eb0bd (diff)
downloadtcl-ac37feedcf44a41b5e00bdc945d4dfb48637d19c.zip
tcl-ac37feedcf44a41b5e00bdc945d4dfb48637d19c.tar.gz
tcl-ac37feedcf44a41b5e00bdc945d4dfb48637d19c.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 c71aa96..cc77afe 100644
--- a/win/tclWinSock.c
+++ b/win/tclWinSock.c
@@ -2052,7 +2052,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;
@@ -2168,6 +2167,7 @@ error:
}
if (statePtr != NULL) {
+ ThreadSpecificData *tsdPtr = TclThreadDataKeyGet(&dataKey);
statePtr->acceptProc = acceptProc;
statePtr->acceptProcData = acceptProcData;