summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2017-09-12 12:11:51 (GMT)
committerdgp <dgp@users.sourceforge.net>2017-09-12 12:11:51 (GMT)
commitb6bf5c825247827226680949d75a3b590b6631a7 (patch)
treeaa3f87d0b3175808f01fc1cbb3d3d95c82baa628 /generic
parent65e82cdc180bb124392469acc17c1400641a3452 (diff)
downloadtcl-b6bf5c825247827226680949d75a3b590b6631a7.zip
tcl-b6bf5c825247827226680949d75a3b590b6631a7.tar.gz
tcl-b6bf5c825247827226680949d75a3b590b6631a7.tar.bz2
When we invalidate the string rep of a dict, that's a sign we need to
free all the intreps of that dict as well.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclDictObj.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c
index f4e15a6..b312fe1 100644
--- a/generic/tclDictObj.c
+++ b/generic/tclDictObj.c
@@ -909,7 +909,11 @@ InvalidateDictChain(
assert( dict != NULL);
do {
+ dict->refCount++;
TclInvalidateStringRep(dictObj);
+ Tcl_FreeIntRep(dictObj);
+ DictSetIntRep(dictObj, dict);
+
dict->epoch++;
dictObj = dict->chain;
if (dictObj == NULL) {