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 | 4cc2a56649321df57c1b454033012816180da91e (patch) | |
tree | 91b412b5cc69b45468c3f3d2e006a10155f2f582 /generic/tclAssembly.c | |
parent | cf932506740f880b4265e40f0a4d4e7dacbf0b9b (diff) | |
parent | 65c016d4a09a729bfedef85021b1e73fc594adb7 (diff) | |
download | tcl-4cc2a56649321df57c1b454033012816180da91e.zip tcl-4cc2a56649321df57c1b454033012816180da91e.tar.gz tcl-4cc2a56649321df57c1b454033012816180da91e.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; } |