summaryrefslogtreecommitdiffstats
path: root/generic/tclBasic.c
diff options
context:
space:
mode:
authordgp@users.sourceforge.net <dgp>2008-02-28 22:36:36 (GMT)
committerdgp@users.sourceforge.net <dgp>2008-02-28 22:36:36 (GMT)
commitfe7fc6b05ade9f44d3f3b4bfef28e56b18c68ed4 (patch)
tree25ed0b70b345dd0d4c003553da12796a1c283309 /generic/tclBasic.c
parent24a11f09488f8d01512673d63cf127189d72acbb (diff)
downloadtcl-fe7fc6b05ade9f44d3f3b4bfef28e56b18c68ed4.zip
tcl-fe7fc6b05ade9f44d3f3b4bfef28e56b18c68ed4.tar.gz
tcl-fe7fc6b05ade9f44d3f3b4bfef28e56b18c68ed4.tar.bz2
* generic/tclBasic.c (TclEvalObjvInternal): Plug memory leak when
an enter trace deletes or changes the command, prompting a reparsing. Don't let the second pass lose commandPtr value allocated during the first pass.
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r--generic/tclBasic.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 35c6bb9..f825fdb 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.291 2008/01/23 21:21:26 dgp Exp $
+ * RCS: @(#) $Id: tclBasic.c,v 1.292 2008/02/28 22:36:37 dgp Exp $
*/
#include "tclInt.h"
@@ -3609,6 +3609,9 @@ TclEvalObjvInternal(
if (cmdEpoch != newEpoch) {
checkTraces = 0;
+ if (commandPtr) {
+ Tcl_DecrRefCount(commandPtr);
+ }
goto reparseBecauseOfTraces;
}
}