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)
commit5191ece51608923ffe06ba71d44ebe0b029b4f34 (patch)
tree6521d31bd10bcd65cbbdbf16eef72f69ecf9c251
parent6c55284908a1e202a6a64ad3cb9d45569cdfcfad (diff)
downloadtcl-5191ece51608923ffe06ba71d44ebe0b029b4f34.zip
tcl-5191ece51608923ffe06ba71d44ebe0b029b4f34.tar.gz
tcl-5191ece51608923ffe06ba71d44ebe0b029b4f34.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) {