diff options
author | Miguel Sofer <miguel.sofer@gmail.com> | 2005-10-22 01:35:26 (GMT) |
---|---|---|
committer | Miguel Sofer <miguel.sofer@gmail.com> | 2005-10-22 01:35:26 (GMT) |
commit | 780cc5981704cb13704126d1ac5835a2e58a0a1d (patch) | |
tree | 31b1f3d80a31faefe0af66f787bf45d30ba22342 /generic | |
parent | 66aeef87da87d50a82fb8bf2675d1b08e7260795 (diff) | |
download | tcl-780cc5981704cb13704126d1ac5835a2e58a0a1d.zip tcl-780cc5981704cb13704126d1ac5835a2e58a0a1d.tar.gz tcl-780cc5981704cb13704126d1ac5835a2e58a0a1d.tar.bz2 |
* generic/tclExecute.c (INST_INCR_*): fixed [Bug 1334570]. Obj
leak detection and patch by Eric Melbardis.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclExecute.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 0287068..d77e51e 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.217 2005/10/19 18:39:58 dgp Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.218 2005/10/22 01:35:26 msofer Exp $ */ #include "tclInt.h" @@ -2382,10 +2382,10 @@ TclExecuteByteCode(interp, codePtr) case INST_INCR_STK_IMM: i = TclGetInt1AtPtr(pc+1); incrPtr = Tcl_NewIntObj(i); + Tcl_IncrRefCount(incrPtr); pcAdjustment = 2; doIncrStk: - Tcl_IncrRefCount(incrPtr); if ((*pc == INST_INCR_ARRAY_STK_IMM) || (*pc == INST_INCR_ARRAY_STK)) { part2 = TclGetString(*tosPtr); @@ -2416,10 +2416,10 @@ TclExecuteByteCode(interp, codePtr) opnd = TclGetUInt1AtPtr(pc+1); i = TclGetInt1AtPtr(pc+2); incrPtr = Tcl_NewIntObj(i); + Tcl_IncrRefCount(incrPtr); pcAdjustment = 3; doIncrArray: - Tcl_IncrRefCount(incrPtr); part2 = TclGetString(*tosPtr); arrayPtr = &(compiledLocals[opnd]); part1 = arrayPtr->name; @@ -2540,9 +2540,9 @@ TclExecuteByteCode(interp, codePtr) } /* All other cases, flow through to generic handling */ TclNewLongObj(incrPtr, i); + Tcl_IncrRefCount(incrPtr); doIncrScalar: - Tcl_IncrRefCount(incrPtr); varPtr = &(compiledLocals[opnd]); part1 = varPtr->name; while (TclIsVarLink(varPtr)) { |