diff options
author | hobbs <hobbs> | 2001-06-28 00:42:39 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2001-06-28 00:42:39 (GMT) |
commit | 41fc16b285fe742f30c631d930d192989ca4f43a (patch) | |
tree | a9e34f7264445ffb04001a4f0c95419c5b3e2348 /generic | |
parent | 612a1b3161165bb6c62c75d298ae52e4552b1f85 (diff) | |
download | tcl-41fc16b285fe742f30c631d930d192989ca4f43a.zip tcl-41fc16b285fe742f30c631d930d192989ca4f43a.tar.gz tcl-41fc16b285fe742f30c631d930d192989ca4f43a.tar.bz2 |
* generic/tclCompCmds.c (TclCompileStringCmd): fixed mem leak when
string command failed to parse the subcommand.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclCompCmds.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index cbe4070..74ba524 100644 --- a/generic/tclCompCmds.c +++ b/generic/tclCompCmds.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompCmds.c,v 1.8 2001/05/17 02:13:02 hobbs Exp $ + * RCS: @(#) $Id: tclCompCmds.c,v 1.9 2001/06/28 00:42:39 hobbs Exp $ */ #include "tclInt.h" @@ -2164,6 +2164,7 @@ TclCompileStringCmd(interp, parsePtr, envPtr) opObj = Tcl_NewStringObj(opTokenPtr->start, opTokenPtr->size); if (Tcl_GetIndexFromObj(interp, opObj, options, "option", 0, &index) != TCL_OK) { + Tcl_DecrRefCount(opObj); return TCL_ERROR; } Tcl_DecrRefCount(opObj); |