diff options
author | mig <mig> | 2011-03-01 20:02:28 (GMT) |
---|---|---|
committer | mig <mig> | 2011-03-01 20:02:28 (GMT) |
commit | 6f017f71965cb7b4b9be15054f25c0936c3356a9 (patch) | |
tree | 73265d60c7bc94b334dc6b9ef2555170806cd3b1 | |
parent | ad4787470445d29656797ce0f19af1ad478eb4e2 (diff) | |
download | tcl-6f017f71965cb7b4b9be15054f25c0936c3356a9.zip tcl-6f017f71965cb7b4b9be15054f25c0936c3356a9.tar.gz tcl-6f017f71965cb7b4b9be15054f25c0936c3356a9.tar.bz2 |
fix leaks in throw and unset compilers
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | generic/tclCompCmdsSZ.c | 2 |
2 files changed, 5 insertions, 0 deletions
@@ -1,5 +1,8 @@ 2011-03-01 Miguel Sofer <msofer@users.sf.net> + * generic/tclCompCmdsSZ.c (TclCompileThrowCmd) + (TclCompileUnsetCmd): fix leaks + * generic/tclBasic.c: This is [Patch 3168398], * generic/tclCompCmdsSZ.c: Joe Mistachkin's optimisation * generic/tclExecute.c: of Tip #285 diff --git a/generic/tclCompCmdsSZ.c b/generic/tclCompCmdsSZ.c index 2f86be1..348098b 100644 --- a/generic/tclCompCmdsSZ.c +++ b/generic/tclCompCmdsSZ.c @@ -1863,6 +1863,7 @@ TclCompileThrowCmd( CompileWord(envPtr, msgToken, interp, 2); TclCompileSyntaxError(interp, envPtr); + Tcl_DecrRefCount(objPtr); return TCL_OK; } if (len == 0) { @@ -2586,6 +2587,7 @@ TclCompileUnsetCmd( * evaluation with reasonable effort, so spill to interpreted version. */ + TclDecrRefCount(leadingWord); return TCL_ERROR; } TclDecrRefCount(leadingWord); |