diff options
author | hobbs <hobbs> | 2003-02-27 00:54:33 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2003-02-27 00:54:33 (GMT) |
commit | bd16122f49a7f12106eec64689e932e06750ecee (patch) | |
tree | ed733c220149ab843d3e5107e1606b15264a69e0 | |
parent | 1ee221c87e5d0ba86662ef7ab275b5423d0308ab (diff) | |
download | tcl-bd16122f49a7f12106eec64689e932e06750ecee.zip tcl-bd16122f49a7f12106eec64689e932e06750ecee.tar.gz tcl-bd16122f49a7f12106eec64689e932e06750ecee.tar.bz2 |
* generic/tclCmdMZ.c (TraceCommandProc): Fix mem leak when
deleting a command that had trace on it. [Bug #693564] (sofer)
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | generic/tclCmdMZ.c | 7 |
2 files changed, 13 insertions, 2 deletions
@@ -1,3 +1,8 @@ +2003-02-26 Jeff Hobbs <jeffh@ActiveState.com> + + * generic/tclCmdMZ.c (TraceCommandProc): Fix mem leak when + deleting a command that had trace on it. [Bug #693564] (sofer) + 2003-02-25 Don Porter <dgp@users.sourceforge.net> * doc/pkgMkIndex.n: Modified [pkg_mkIndex] to use -nocase matching @@ -8,7 +13,8 @@ 2003-02-25 Andreas Kupries <andreask@pliers.activestate.com> * tests/pid.test: See below [Bug #678412]. - * tests/io.test: Made more robust against spaces in paths [Bug #678400]. + * tests/io.test: Made more robust against spaces in paths + [Bug #678400]. 2003-02-25 Miguel Sofer <msofer@users.sf.net> diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 2339965..2ae4819 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.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: tclCmdMZ.c,v 1.81 2003/02/18 02:25:43 hobbs Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.82 2003/02/27 00:54:36 hobbs Exp $ */ #include "tclInt.h" @@ -4074,6 +4074,11 @@ TraceCommandProc(clientData, interp, oldName, newName, flags) /* Postpone deletion, until exec trace returns */ tcmdPtr->flags = 0; } + /* + * Decrement the refCount since the command which held our + * reference (ever since we were created) has just gone away + */ + tcmdPtr->refCount--; } if ((--tcmdPtr->refCount) <= 0) { ckfree((char*)tcmdPtr); |