summaryrefslogtreecommitdiffstats
path: root/generic/tclUtil.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2015-11-20 16:42:57 (GMT)
committerdgp <dgp@users.sourceforge.net>2015-11-20 16:42:57 (GMT)
commitb043297e8b02ea12c45a49b4cea4dcaa50da99b3 (patch)
treea7f9d5de436e44a163dfaca6fba37508ef99f227 /generic/tclUtil.c
parent0c95d1d7c2d07e8a422b8af055160e8009e7eeb4 (diff)
parentc32d032cbd7947d9e64e931df87fc4f374d81e7f (diff)
downloadtcl-b043297e8b02ea12c45a49b4cea4dcaa50da99b3.zip
tcl-b043297e8b02ea12c45a49b4cea4dcaa50da99b3.tar.gz
tcl-b043297e8b02ea12c45a49b4cea4dcaa50da99b3.tar.bz2
[40f628e8e3] Tcl_ListObjReplace() callers need to handle TCL_ERROR.
Diffstat (limited to 'generic/tclUtil.c')
-rw-r--r--generic/tclUtil.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/generic/tclUtil.c b/generic/tclUtil.c
index 8de0267..2b0fb72 100644
--- a/generic/tclUtil.c
+++ b/generic/tclUtil.c
@@ -1981,7 +1981,11 @@ Tcl_ConcatObj(
continue;
}
if (resPtr) {
- Tcl_ListObjAppendList(NULL, resPtr, objPtr);
+ if (TCL_OK != Tcl_ListObjAppendList(NULL, resPtr, objPtr)) {
+ /* Abandon ship! */
+ Tcl_DecrRefCount(resPtr);
+ goto slow;
+ }
} else {
resPtr = TclListObjCopy(NULL, objPtr);
}
@@ -1992,6 +1996,7 @@ Tcl_ConcatObj(
return resPtr;
}
+ slow:
/*
* Something cannot be determined to be safe, so build the concatenation
* the slow way, using the string representations.