summaryrefslogtreecommitdiffstats
path: root/generic/tclOOCall.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2011-08-07 15:46:09 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2011-08-07 15:46:09 (GMT)
commit097bee7c6ba61b29717c1780aed2370468649e4f (patch)
treebbf523102341bcdd9dbbcf0f2d711f8b1e363a97 /generic/tclOOCall.c
parentd90ed9c0f07bbb5cf66140e89fcebc0da3f08285 (diff)
downloadtcl-097bee7c6ba61b29717c1780aed2370468649e4f.zip
tcl-097bee7c6ba61b29717c1780aed2370468649e4f.tar.gz
tcl-097bee7c6ba61b29717c1780aed2370468649e4f.tar.bz2
[Bug 3387082]: Plug memory leak in call chain introspection.
Diffstat (limited to 'generic/tclOOCall.c')
-rw-r--r--generic/tclOOCall.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/generic/tclOOCall.c b/generic/tclOOCall.c
index b5d7c0c..9c9f3c0 100644
--- a/generic/tclOOCall.c
+++ b/generic/tclOOCall.c
@@ -1166,7 +1166,7 @@ TclOOGetStereotypeCallChain(
hPtr = NULL;
}
- callPtr = (CallChain *) ckalloc(sizeof(CallChain));
+ callPtr = ckalloc(sizeof(CallChain));
memset(callPtr, 0, sizeof(CallChain));
callPtr->flags = flags & (PUBLIC_METHOD|PRIVATE_METHOD|FILTER_HANDLING);
callPtr->epoch = fPtr->epoch;
@@ -1214,9 +1214,7 @@ TclOOGetStereotypeCallChain(
} else {
if (hPtr == NULL) {
if (clsPtr->classChainCache == NULL) {
- clsPtr->classChainCache = (Tcl_HashTable *)
- ckalloc(sizeof(Tcl_HashTable));
-
+ clsPtr->classChainCache = ckalloc(sizeof(Tcl_HashTable));
Tcl_InitObjHashTable(clsPtr->classChainCache);
}
hPtr = Tcl_CreateHashEntry(clsPtr->classChainCache,