Tcl Source Code

Artifact [4585ab1c11]
Login

Artifact 4585ab1c11bbcbf8bc7fe3b9513853f37385d562:

Attachment "tclenc.diff" to ticket [622441ffff] added by jcw 2002-10-14 21:34:01.
Index: tclEvent.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclEvent.c,v
retrieving revision 1.23
diff -u -r1.23 tclEvent.c
--- tclEvent.c  5 Aug 2002 03:24:40 -0000       1.23
+++ tclEvent.c  14 Oct 2002 14:31:19 -0000
@@ -812,21 +812,6 @@
        TclFinalizeCompExecEnv();
        TclFinalizeEnvironment();

-       TclFinalizeEncodingSubsystem();
-
-       if (tclExecutableName != NULL) {
-           ckfree(tclExecutableName);
-           tclExecutableName = NULL;
-       }
-       if (tclNativeExecutableName != NULL) {
-           ckfree(tclNativeExecutableName);
-           tclNativeExecutableName = NULL;
-       }
-       if (tclDefaultEncodingDir != NULL) {
-           ckfree(tclDefaultEncodingDir);
-           tclDefaultEncodingDir = NULL;
-       }
-
        Tcl_SetPanicProc(NULL);

        /*
@@ -843,6 +828,21 @@
         */
        TclFinalizeFilesystem();

+       TclFinalizeEncodingSubsystem();
+
+       if (tclExecutableName != NULL) {
+           ckfree(tclExecutableName);
+           tclExecutableName = NULL;
+       }
+       if (tclNativeExecutableName != NULL) {
+           ckfree(tclNativeExecutableName);
+           tclNativeExecutableName = NULL;
+       }
+       if (tclDefaultEncodingDir != NULL) {
+           ckfree(tclDefaultEncodingDir);
+           tclDefaultEncodingDir = NULL;
+       }
+
        /*
         * There shouldn't be any malloc'ed memory after this.
         */