summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--generic/tclThread.c7
-rw-r--r--generic/tclThreadStorage.c4
3 files changed, 10 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index a0ed390..57e55d4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-03-15 Joe Mistachkin <joe@mistachkin.com>
+
+ * generic/tclThread.c: Modify fix for TSD leak to match Tcl 8.5
+ * generic/tclThreadStorage.c: (and prior) allocation semantics. [Bug
+ 2687952]
+
2009-03-15 Donal K. Fellows <dkf@users.sf.net>
* generic/tclThreadStorage.c (TSDTableDelete): [Bug 2687952]: Ensure
diff --git a/generic/tclThread.c b/generic/tclThread.c
index 314a4fb..58cc18d 100644
--- a/generic/tclThread.c
+++ b/generic/tclThread.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclThread.c,v 1.24 2009/03/15 22:34:59 dkf Exp $
+ * RCS: @(#) $Id: tclThread.c,v 1.25 2009/03/16 00:43:09 mistachkin Exp $
*/
#include "tclInt.h"
@@ -88,10 +88,7 @@ Tcl_GetThreadData(
result = TclThreadStorageKeyGet(keyPtr);
if (result == NULL) {
- result = TclpSysAlloc((size_t) size, 0);
- if (result == NULL) {
- Tcl_Panic("unable to alloc %u bytes", (unsigned) size);
- }
+ result = ckalloc((size_t)size);
memset(result, 0, (size_t) size);
TclThreadStorageKeySet(keyPtr, result);
}
diff --git a/generic/tclThreadStorage.c b/generic/tclThreadStorage.c
index adcf1d3..1a0a89d 100644
--- a/generic/tclThreadStorage.c
+++ b/generic/tclThreadStorage.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclThreadStorage.c,v 1.19 2009/03/15 22:34:59 dkf Exp $
+ * RCS: @(#) $Id: tclThreadStorage.c,v 1.20 2009/03/16 00:43:09 mistachkin Exp $
*/
#include "tclInt.h"
@@ -119,7 +119,7 @@ TSDTableDelete(
* and must now be deallocated or they will leak.
*/
- TclpSysFree((char *) tsdTablePtr->tablePtr[i]);
+ ckfree((char *) tsdTablePtr->tablePtr[i]);
}
}