summaryrefslogtreecommitdiffstats
path: root/generic/tclIOCmd.c
diff options
context:
space:
mode:
authormsofer <msofer@noemail.net>2005-11-04 22:38:38 (GMT)
committermsofer <msofer@noemail.net>2005-11-04 22:38:38 (GMT)
commit5f19cc5582416636860ba618987cf45bc742e2b5 (patch)
treeadcafce2861cb0011abba51ff7721b2c425f5bad /generic/tclIOCmd.c
parent4866c46a68d833a22a0fb59514018d73baba690d (diff)
downloadtcl-5f19cc5582416636860ba618987cf45bc742e2b5.zip
tcl-5f19cc5582416636860ba618987cf45bc742e2b5.tar.gz
tcl-5f19cc5582416636860ba618987cf45bc742e2b5.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. FossilOrigin-Name: 510663a99e3a096bb7bab7314eb59fc805335318
Diffstat (limited to 'generic/tclIOCmd.c')
-rw-r--r--generic/tclIOCmd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/generic/tclIOCmd.c b/generic/tclIOCmd.c
index b6232ac..276ccf5 100644
--- a/generic/tclIOCmd.c
+++ b/generic/tclIOCmd.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclIOCmd.c,v 1.32 2005/11/01 15:30:52 dkf Exp $
+ * RCS: @(#) $Id: tclIOCmd.c,v 1.33 2005/11/04 22:38:38 msofer Exp $
*/
#include "tclInt.h"
@@ -289,7 +289,6 @@ Tcl_GetsObjCmd(
if (objc == 3) {
if (Tcl_ObjSetVar2(interp, objv[2], NULL, linePtr,
TCL_LEAVE_ERR_MSG) == NULL) {
- Tcl_DecrRefCount(linePtr);
return TCL_ERROR;
}
Tcl_SetObjResult(interp, Tcl_NewIntObj(lineLen));