diff options
author | dgp <dgp@users.sourceforge.net> | 2016-03-01 16:42:03 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2016-03-01 16:42:03 (GMT) |
commit | 5be04ec11ef9378c093c4403bc37ee5e8955de2a (patch) | |
tree | f780a4fc2384f155fb49a9e432d1f54f4d1afe77 /generic/tclVar.c | |
parent | 22557045ac8877ad5bc11249c371d01baf4907ba (diff) | |
download | tcl-5be04ec11ef9378c093c4403bc37ee5e8955de2a.zip tcl-5be04ec11ef9378c093c4403bc37ee5e8955de2a.tar.gz tcl-5be04ec11ef9378c093c4403bc37ee5e8955de2a.tar.bz2 |
Extra safety against cycles
Diffstat (limited to 'generic/tclVar.c')
-rw-r--r-- | generic/tclVar.c | 3 |
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 { |