summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2009-11-09 22:36:39 (GMT)
committerdgp <dgp@users.sourceforge.net>2009-11-09 22:36:39 (GMT)
commitc69c58efa6a8335b33f5681b818245ae1da86be1 (patch)
tree64fb44faa5b86d55cf442e032f8fd41eaac0a53c /generic
parent81400277fe84e58e0ba9ad3ac57ad5637fe08b0f (diff)
downloadtcl-c69c58efa6a8335b33f5681b818245ae1da86be1.zip
tcl-c69c58efa6a8335b33f5681b818245ae1da86be1.tar.gz
tcl-c69c58efa6a8335b33f5681b818245ae1da86be1.tar.bz2
* generic/tclBasic.c (TclEvalObjEx): Plug memory leak in
TCL_EVAL_DIRECT evaluation. * tests/info.test: Resolve ambiguous resolution of variable "res".
Diffstat (limited to 'generic')
-rw-r--r--generic/tclBasic.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 90b6c21..63548ea 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -14,7 +14,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclBasic.c,v 1.295.2.14 2009/10/31 20:25:32 dkf Exp $
+ * RCS: @(#) $Id: tclBasic.c,v 1.295.2.15 2009/11/09 22:36:39 dgp Exp $
*/
#include "tclInt.h"
@@ -5226,14 +5226,14 @@ TclEvalObjEx(
result = TclEvalEx(interp, script, numSrcBytes, flags,
ctxPtr->line[word], NULL, script);
+ }
- if (pc) {
- /*
- * Death of SrcInfo reference.
- */
+ if (pc && (ctxPtr->type == TCL_LOCATION_SOURCE)) {
+ /*
+ * Death of SrcInfo reference.
+ */
- Tcl_DecrRefCount(ctxPtr->data.eval.path);
- }
+ Tcl_DecrRefCount(ctxPtr->data.eval.path);
}
TclStackFree(interp, ctxPtr);