summaryrefslogtreecommitdiffstats
path: root/generic/tclBinary.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/tclBinary.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/tclBinary.c')
-rw-r--r--generic/tclBinary.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/generic/tclBinary.c b/generic/tclBinary.c
index a5c2842..c20f4df 100644
--- a/generic/tclBinary.c
+++ b/generic/tclBinary.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclBinary.c,v 1.26 2005/09/27 15:20:35 dkf Exp $
+ * RCS: @(#) $Id: tclBinary.c,v 1.27 2005/11/04 22:38:38 msofer Exp $
*/
#include "tclInt.h"
@@ -1085,7 +1085,6 @@ Tcl_BinaryObjCmd(
arg++;
if (resultPtr == NULL) {
DeleteScanNumberCache(numberCachePtr);
- Tcl_DecrRefCount(valuePtr); /* unneeded */
return TCL_ERROR;
}
offset += count;
@@ -1140,7 +1139,6 @@ Tcl_BinaryObjCmd(
arg++;
if (resultPtr == NULL) {
DeleteScanNumberCache(numberCachePtr);
- Tcl_DecrRefCount(valuePtr); /* unneeded */
return TCL_ERROR;
}
offset += (count + 7 ) / 8;
@@ -1197,7 +1195,6 @@ Tcl_BinaryObjCmd(
arg++;
if (resultPtr == NULL) {
DeleteScanNumberCache(numberCachePtr);
- Tcl_DecrRefCount(valuePtr); /* unneeded */
return TCL_ERROR;
}
offset += (count + 1) / 2;
@@ -1267,7 +1264,6 @@ Tcl_BinaryObjCmd(
arg++;
if (resultPtr == NULL) {
DeleteScanNumberCache(numberCachePtr);
- Tcl_DecrRefCount(valuePtr); /* unneeded */
return TCL_ERROR;
}
break;