summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2006-10-17 15:39:24 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2006-10-17 15:39:24 (GMT)
commit57ab6ad9ea607896a402e20274dc12fb1e5db6d5 (patch)
tree7d83e70e9805cac4c05a984abca94a5993474d37 /generic
parent16c6dd8402ad04f625c0546f3a1715baa928da5f (diff)
downloadtcl-57ab6ad9ea607896a402e20274dc12fb1e5db6d5.zip
tcl-57ab6ad9ea607896a402e20274dc12fb1e5db6d5.tar.gz
tcl-57ab6ad9ea607896a402e20274dc12fb1e5db6d5.tar.bz2
* generic/tclInterp.c (ApplyObjCmd): fixed bad error in 2006-10-12
commit: interp released too early. Spotted by mistachkin.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclInterp.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/generic/tclInterp.c b/generic/tclInterp.c
index 6379528..60e6eb6 100644
--- a/generic/tclInterp.c
+++ b/generic/tclInterp.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: tclInterp.c,v 1.63 2006/10/12 16:24:13 msofer Exp $
+ * RCS: @(#) $Id: tclInterp.c,v 1.64 2006/10/17 15:39:24 msofer Exp $
*/
#include "tclInt.h"
@@ -1742,7 +1742,6 @@ AliasObjCmd(
Tcl_Preserve((ClientData) targetInterp);
result = Tcl_EvalObjv(targetInterp, cmdc, cmdv, TCL_EVAL_INVOKE);
TclTransferResult(targetInterp, result, interp);
- Tcl_Release((ClientData) targetInterp);
} else {
result = Tcl_EvalObjv(targetInterp, cmdc, cmdv, TCL_EVAL_INVOKE);
}
@@ -1753,6 +1752,10 @@ AliasObjCmd(
tPtr->ensembleRewrite.numInsertedObjs = 0;
}
+ if (targetInterp != interp) {
+ Tcl_Release((ClientData) targetInterp);
+ }
+
for (i=0; i<cmdc; i++) {
Tcl_DecrRefCount(cmdv[i]);
}