diff options
author | dgp <dgp@users.sourceforge.net> | 2013-06-27 13:11:53 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2013-06-27 13:11:53 (GMT) |
commit | e72d24628cda082e00cafb1ec1e95ea027dc66c8 (patch) | |
tree | b29f82e0fab0c3ab46a5f769a17c22f9ea9d6552 /generic/tclCompile.c | |
parent | 05ee22d705676f10827b8ffc1f31e0436fa231d7 (diff) | |
download | tcl-e72d24628cda082e00cafb1ec1e95ea027dc66c8.zip tcl-e72d24628cda082e00cafb1ec1e95ea027dc66c8.tar.gz tcl-e72d24628cda082e00cafb1ec1e95ea027dc66c8.tar.bz2 |
plug memory leaks
Diffstat (limited to 'generic/tclCompile.c')
-rw-r--r-- | generic/tclCompile.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/generic/tclCompile.c b/generic/tclCompile.c index 62943b2..416078c 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -1746,7 +1746,7 @@ CompileCommandTokens( int *lastPopPtr) { Interp *iPtr = (Interp *) interp; - Tcl_Obj *cmdObj = Tcl_NewObj(); + Tcl_Obj *cmdObj; Tcl_Token *tokenPtr = parsePtr->tokenPtr; Command *cmdPtr = NULL; int wordIdx, cmdKnown, expand = 0, numWords = parsePtr->numWords; @@ -1765,6 +1765,7 @@ CompileCommandTokens( } } + cmdObj = Tcl_NewObj(); Tcl_IncrRefCount(cmdObj); tokenPtr = parsePtr->tokenPtr; cmdKnown = TclWordKnownAtCompileTime(tokenPtr, cmdObj); @@ -2085,6 +2086,7 @@ TclCompileScript( parse.commandStart + parse.commandSize - 1)? parse.commandSize - 1 : parse.commandSize); TclCompileSyntaxError(interp, envPtr); + Tcl_FreeParse(&parse); lastPop = -1; break; } |