summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2016-03-01 16:42:03 (GMT)
committerdgp <dgp@users.sourceforge.net>2016-03-01 16:42:03 (GMT)
commit7d6b4ece6967da652c3eeb1f0baced245473353b (patch)
treef780a4fc2384f155fb49a9e432d1f54f4d1afe77 /generic
parent9b5987cf695225d4884be4f62c09568bca318408 (diff)
downloadtcl-7d6b4ece6967da652c3eeb1f0baced245473353b.zip
tcl-7d6b4ece6967da652c3eeb1f0baced245473353b.tar.gz
tcl-7d6b4ece6967da652c3eeb1f0baced245473353b.tar.bz2
Extra safety against cyclesbug_80304238ac
Diffstat (limited to 'generic')
-rw-r--r--generic/tclVar.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/generic/tclVar.c b/generic/tclVar.c
index 12e52c2..5574f30 100644
--- a/generic/tclVar.c
+++ b/generic/tclVar.c
@@ -703,7 +703,8 @@ TclObjLookupVarEx(
if (part1Ptr != cachedNamePtr) {
part1Ptr->internalRep.twoPtrValue.ptr1 = cachedNamePtr;
Tcl_IncrRefCount(cachedNamePtr);
- if (cachedNamePtr->typePtr != &localVarNameType) {
+ if (cachedNamePtr->typePtr != &localVarNameType
+ || cachedNamePtr->internalRep.twoPtrValue.ptr1 != NULL) {
TclFreeIntRep(cachedNamePtr);
}
} else {