summaryrefslogtreecommitdiffstats
path: root/generic/tclThreadAlloc.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2014-09-14 16:51:49 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2014-09-14 16:51:49 (GMT)
commit271b5469d26171f90501fd3dc1eea1bf2bd83b08 (patch)
tree390fd760e66cc765b1400f22af69dc5ef2a00f66 /generic/tclThreadAlloc.c
parentbbf5dede141290a90faaa2bbf2e8abba59d33c04 (diff)
parent7e17c358eb7a149fbec81f4c2e5d1adefcc90bdd (diff)
downloadtcl-271b5469d26171f90501fd3dc1eea1bf2bd83b08.zip
tcl-271b5469d26171f90501fd3dc1eea1bf2bd83b08.tar.gz
tcl-271b5469d26171f90501fd3dc1eea1bf2bd83b08.tar.bz2
merge trunk
Diffstat (limited to 'generic/tclThreadAlloc.c')
-rw-r--r--generic/tclThreadAlloc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/generic/tclThreadAlloc.c b/generic/tclThreadAlloc.c
index 5cb8027..560556d 100644
--- a/generic/tclThreadAlloc.c
+++ b/generic/tclThreadAlloc.c
@@ -217,10 +217,11 @@ GetCache(void)
cachePtr = TclpGetAllocCache();
if (cachePtr == NULL) {
- cachePtr = calloc(1, sizeof(Cache));
+ cachePtr = TclpSysAlloc(sizeof(Cache), 0);
if (cachePtr == NULL) {
Tcl_Panic("alloc: could not allocate new cache");
}
+ memset(cachePtr, 0, sizeof(Cache));
Tcl_MutexLock(listLockPtr);
cachePtr->nextPtr = firstCachePtr;
firstCachePtr = cachePtr;