summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-12-27 20:54:31 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-12-27 20:54:31 (GMT)
commitac61536f6a47bcbaa93399b81a184f647d62a259 (patch)
treecb600b9e95d56d0f5504ae75b86da6e4929f3bce /generic
parent74ba8ceda7f5765eb6d06f6bac99f565b9a71154 (diff)
downloadtcl-ac61536f6a47bcbaa93399b81a184f647d62a259.zip
tcl-ac61536f6a47bcbaa93399b81a184f647d62a259.tar.gz
tcl-ac61536f6a47bcbaa93399b81a184f647d62a259.tar.bz2
restore old refcounts in TCL_ERROR case.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclListObj.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/generic/tclListObj.c b/generic/tclListObj.c
index 1166759..97e7152 100644
--- a/generic/tclListObj.c
+++ b/generic/tclListObj.c
@@ -906,6 +906,9 @@ Tcl_ListObjReplace(
listRepPtr = AttemptNewList(interp, newMax, NULL);
if (listRepPtr == NULL) {
+ for (i = 0; i < objc; i++) {
+ objv[i]->refCount--;
+ }
return TCL_ERROR;
}