summaryrefslogtreecommitdiffstats
path: root/generic/tclLink.c
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2005-11-04 22:38:38 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2005-11-04 22:38:38 (GMT)
commita371489bc6ceddc40588b7fc34595e01989d633d (patch)
treeadcafce2861cb0011abba51ff7721b2c425f5bad /generic/tclLink.c
parent137f3babeb8df0e8ffaba858265c4472b80adb29 (diff)
downloadtcl-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/tclLink.c')
-rw-r--r--generic/tclLink.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/generic/tclLink.c b/generic/tclLink.c
index 2ab72ff..0dcb995 100644
--- a/generic/tclLink.c
+++ b/generic/tclLink.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: tclLink.c,v 1.13 2005/10/08 14:42:45 dgp Exp $
+ * RCS: @(#) $Id: tclLink.c,v 1.14 2005/11/04 22:38:38 msofer Exp $
*/
#include "tclInt.h"
@@ -118,7 +118,6 @@ Tcl_LinkVar(interp, varName, addr, type)
if (Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, objPtr,
TCL_GLOBAL_ONLY|TCL_LEAVE_ERR_MSG) == NULL) {
Tcl_DecrRefCount(linkPtr->varName);
- Tcl_DecrRefCount(objPtr);
ckfree((char *) linkPtr);
return TCL_ERROR;
}