summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorhypnotoad <yoda@etoyoc.com>2014-09-03 21:24:17 (GMT)
committerhypnotoad <yoda@etoyoc.com>2014-09-03 21:24:17 (GMT)
commite9cf5184532af00157a7f43eb9c2dc4aa4045b69 (patch)
tree74a1c2a4ea1fc7f6ad6bec75b74fe49466a05e3f /generic
parent2a0c3c78b87ed2aab28dc3aab3fad25cd91bcdad (diff)
parent8d5c986031606a4565659bb82dcbba7ab9ce0186 (diff)
downloadtcl-e9cf5184532af00157a7f43eb9c2dc4aa4045b69.zip
tcl-e9cf5184532af00157a7f43eb9c2dc4aa4045b69.tar.gz
tcl-e9cf5184532af00157a7f43eb9c2dc4aa4045b69.tar.bz2
Merging changes from trunk
Diffstat (limited to 'generic')
-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;