diff options
author | dgp <dgp@users.sourceforge.net> | 2013-02-22 19:05:56 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2013-02-22 19:05:56 (GMT) |
commit | 69d70d74daaeb3e28f9e6f851396324e7ce383fb (patch) | |
tree | 91b412b5cc69b45468c3f3d2e006a10155f2f582 /generic/tclAssembly.c | |
parent | 7a3b6d780c3e6b3d8f002c499f11daea41cd411a (diff) | |
parent | c321250dcd5875ebaf9503f4278e9c1f6a3ca30c (diff) | |
download | tcl-69d70d74daaeb3e28f9e6f851396324e7ce383fb.zip tcl-69d70d74daaeb3e28f9e6f851396324e7ce383fb.tar.gz tcl-69d70d74daaeb3e28f9e6f851396324e7ce383fb.tar.bz2 |
Shift more burden of smart cleanup onto the TclFreeCompileEnv() routine.
Stop crashes when the hookProc raises an error.
Diffstat (limited to 'generic/tclAssembly.c')
-rw-r--r-- | generic/tclAssembly.c | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/generic/tclAssembly.c b/generic/tclAssembly.c index 0f05d06..c81788d 100644 --- a/generic/tclAssembly.c +++ b/generic/tclAssembly.c @@ -886,44 +886,6 @@ CompileAssembleObj( /* * Assembly failed. Clean up and report the error. */ - - /* - * Free any literals that were constructed for the assembly. - */ - for (i = 0; i < compEnv.literalArrayNext; i++) { - TclReleaseLiteral(interp, compEnv.literalArrayPtr[i].objPtr); - } - - /* - * Free any auxiliary data that was attached to the bytecode - * under construction. - */ - - for (i = 0; i < compEnv.auxDataArrayNext; i++) { - auxDataPtr = compEnv.auxDataArrayPtr + i; - if (auxDataPtr->type->freeProc != NULL) { - (auxDataPtr->type->freeProc)(auxDataPtr->clientData); - } - } - - /* - * TIP 280. If there is extended command line information, - * we need to clean it up. - */ - - if (compEnv.extCmdMapPtr != NULL) { - if (compEnv.extCmdMapPtr->type == TCL_LOCATION_SOURCE) { - Tcl_DecrRefCount(compEnv.extCmdMapPtr->path); - } - for (i = 0; i < compEnv.extCmdMapPtr->nuloc; ++i) { - ckfree(compEnv.extCmdMapPtr->loc[i].line); - } - if (compEnv.extCmdMapPtr->loc != NULL) { - ckfree(compEnv.extCmdMapPtr->loc); - } - Tcl_DeleteHashTable(&(compEnv.extCmdMapPtr->litInfo)); - } - TclFreeCompileEnv(&compEnv); return NULL; } |