diff options
author | dgp <dgp@users.sourceforge.net> | 2014-07-10 16:40:30 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2014-07-10 16:40:30 (GMT) |
commit | 31eb3eebb78fcd7a0f055fe6ef950cd8faba904e (patch) | |
tree | 814789ffd44685ad57bbf6d5833c06e80fa27979 | |
parent | cf1f2fb61e4c80638f8de6c2c218d1bb9ee04aa9 (diff) | |
parent | b81d871afb75e89084b40119c3668bf010d43786 (diff) | |
download | tcl-31eb3eebb78fcd7a0f055fe6ef950cd8faba904e.zip tcl-31eb3eebb78fcd7a0f055fe6ef950cd8faba904e.tar.gz tcl-31eb3eebb78fcd7a0f055fe6ef950cd8faba904e.tar.bz2 |
[7368d225a6] Extend the auto-cleanup of zero ref count values passed in to
the Tcl_*SetVar*() family of routines to cover the missing case where the
flags value of TCL_APPEND_VALUE is passed in alone.
*** POTENTIAL INCOMAPTIBILITY***
-rw-r--r-- | generic/tclVar.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/generic/tclVar.c b/generic/tclVar.c index 4694cd8..5e3157e 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -1958,6 +1958,9 @@ TclPtrSetVar( Tcl_IncrRefCount(oldValuePtr); /* Since var is ref */ } Tcl_AppendObjToObj(oldValuePtr, newValuePtr); + if (newValuePtr->refCount == 0) { + Tcl_DecrRefCount(newValuePtr); + } } } } else if (newValuePtr != oldValuePtr) { |