diff options
author | Miguel Sofer <miguel.sofer@gmail.com> | 2005-11-04 22:38:38 (GMT) |
---|---|---|
committer | Miguel Sofer <miguel.sofer@gmail.com> | 2005-11-04 22:38:38 (GMT) |
commit | a371489bc6ceddc40588b7fc34595e01989d633d (patch) | |
tree | adcafce2861cb0011abba51ff7721b2c425f5bad /generic/tclExecute.c | |
parent | 137f3babeb8df0e8ffaba858265c4472b80adb29 (diff) | |
download | tcl-a371489bc6ceddc40588b7fc34595e01989d633d.zip tcl-a371489bc6ceddc40588b7fc34595e01989d633d.tar.gz tcl-a371489bc6ceddc40588b7fc34595e01989d633d.tar.bz2 |
* generic/tclBinary.c:
* generic/tclCmdAH.c:
* generic/tclCmdIL.c:
* generic/tclCmdMZ.c:
* generic/tclDictObj.c:
* generic/tclExecute.c:
* generic/tclIOCmd.c:
* generic/tclLink.c:
* generic/tclTest.c:
* generic/tclVar.c: fix for [Bug 1334947]. The functions
TclPtrSetVar, Tcl_ObjSetVar2 and Tcl_SetVar2Ex now always consume
the newValuePtr argument - i.e., they will free a 0-refCount
object if they failed to set the variable. Fixed all callers in
the core.
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r-- | generic/tclExecute.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 3f47527..7bfb787 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.219 2005/11/02 11:55:47 dkf Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.220 2005/11/04 22:38:38 msofer Exp $ */ #include "tclInt.h" @@ -5503,10 +5503,7 @@ TclExecuteByteCode( valIndex = (iterNum * numVars); for (j = 0; j < numVars; j++) { - int setEmptyStr = 0; - if (valIndex >= listLen) { - setEmptyStr = 1; TclNewObj(valuePtr); } else { valuePtr = elements[valIndex]; @@ -5538,9 +5535,6 @@ TclExecuteByteCode( if (value2Ptr == NULL) { TRACE_WITH_OBJ(("%u => ERROR init. index temp %d: ", opnd, varIndex), Tcl_GetObjResult(interp)); - if (setEmptyStr) { - TclDecrRefCount(valuePtr); - } result = TCL_ERROR; goto checkForCatch; } |