summaryrefslogtreecommitdiffstats
path: root/generic/tclListObj.c
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)
commitbf14f11c637d99ef6bea288be84e26f551de5693 (patch)
treecb600b9e95d56d0f5504ae75b86da6e4929f3bce /generic/tclListObj.c
parent78d91cb25398a571e59790e8ba63206f8a6372ea (diff)
downloadtcl-bf14f11c637d99ef6bea288be84e26f551de5693.zip
tcl-bf14f11c637d99ef6bea288be84e26f551de5693.tar.gz
tcl-bf14f11c637d99ef6bea288be84e26f551de5693.tar.bz2
restore old refcounts in TCL_ERROR case.
Diffstat (limited to 'generic/tclListObj.c')
-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;
}