summaryrefslogtreecommitdiffstats
path: root/generic/tclCompCmds.c
diff options
context:
space:
mode:
authorhobbs <hobbs>2001-06-28 00:42:39 (GMT)
committerhobbs <hobbs>2001-06-28 00:42:39 (GMT)
commit41fc16b285fe742f30c631d930d192989ca4f43a (patch)
treea9e34f7264445ffb04001a4f0c95419c5b3e2348 /generic/tclCompCmds.c
parent612a1b3161165bb6c62c75d298ae52e4552b1f85 (diff)
downloadtcl-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/tclCompCmds.c')
-rw-r--r--generic/tclCompCmds.c3
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);