summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2014-07-31 19:58:53 (GMT)
committerdgp <dgp@users.sourceforge.net>2014-07-31 19:58:53 (GMT)
commit1666ae35d8a1d7fd4183adbcca775f541b8596eb (patch)
tree6521d31bd10bcd65cbbdbf16eef72f69ecf9c251
parentf10bee2648e7e87c576a1afe761e8525255d3a7a (diff)
downloadtcl-1666ae35d8a1d7fd4183adbcca775f541b8596eb.zip
tcl-1666ae35d8a1d7fd4183adbcca775f541b8596eb.tar.gz
tcl-1666ae35d8a1d7fd4183adbcca775f541b8596eb.tar.bz2
[a84a720966] Protect against double free in TclOO classChainCache teardown.
-rw-r--r--generic/tclOOCall.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tclOOCall.c b/generic/tclOOCall.c
index 26fd09f..897f635 100644
--- a/generic/tclOOCall.c
+++ b/generic/tclOOCall.c
@@ -150,7 +150,7 @@ void
TclOODeleteChain(
CallChain *callPtr)
{
- if (--callPtr->refCount >= 1) {
+ if (callPtr == NULL || --callPtr->refCount >= 1) {
return;
}
if (callPtr->chain != callPtr->staticChain) {