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)
commit73502b8525ebea0be169656f9b8abe994145b6bb (patch)
treebbf523102341bcdd9dbbcf0f2d711f8b1e363a97 /generic/tclOOCall.c
parentf25cac5641054cdcb10695a12976ec96d0f55e26 (diff)
downloadtcl-73502b8525ebea0be169656f9b8abe994145b6bb.zip
tcl-73502b8525ebea0be169656f9b8abe994145b6bb.tar.gz
tcl-73502b8525ebea0be169656f9b8abe994145b6bb.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,