diff options
author | hobbs <hobbs@noemail.net> | 2003-02-27 00:54:32 (GMT) |
---|---|---|
committer | hobbs <hobbs@noemail.net> | 2003-02-27 00:54:32 (GMT) |
commit | 18b22e9746095eea68a15e4a5406256058ba7dd3 (patch) | |
tree | ed733c220149ab843d3e5107e1606b15264a69e0 /generic | |
parent | 13022fd3af1ae5ee859f1399f94c358bceb6b6d8 (diff) | |
download | tcl-18b22e9746095eea68a15e4a5406256058ba7dd3.zip tcl-18b22e9746095eea68a15e4a5406256058ba7dd3.tar.gz tcl-18b22e9746095eea68a15e4a5406256058ba7dd3.tar.bz2 |
* generic/tclCmdMZ.c (TraceCommandProc): Fix mem leak when
deleting a command that had trace on it. [Bug #693564] (sofer)
FossilOrigin-Name: 8bb4478f384ce86f7f334b7af6c41da96d9ce842
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclCmdMZ.c | 7 |
1 files changed, 6 insertions, 1 deletions
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); |