diff options
author | dgp <dgp@users.sourceforge.net> | 2014-12-23 03:11:01 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2014-12-23 03:11:01 (GMT) |
commit | b49e834f28c9fd688fa615cb5809549c58f65788 (patch) | |
tree | a5328c9e7f0e9394621e84657c6454994d8084af /generic/tclEncoding.c | |
parent | 9b9c29e352eb0ae7a048fa4ca8a021a4100d2b40 (diff) | |
parent | dd4496550090acf79f5e144602c745533549eea5 (diff) | |
download | tcl-b49e834f28c9fd688fa615cb5809549c58f65788.zip tcl-b49e834f28c9fd688fa615cb5809549c58f65788.tar.gz tcl-b49e834f28c9fd688fa615cb5809549c58f65788.tar.bz2 |
merge trunk
Diffstat (limited to 'generic/tclEncoding.c')
-rw-r--r-- | generic/tclEncoding.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index f33e0e6..2a766d1 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -180,9 +180,9 @@ TCL_DECLARE_MUTEX(encodingMutex) * the system encoding will be used to perform the conversion. */ -static Tcl_Encoding defaultEncoding; -static Tcl_Encoding systemEncoding; -Tcl_Encoding tclIdentityEncoding; +static Tcl_Encoding defaultEncoding = NULL; +static Tcl_Encoding systemEncoding = NULL; +Tcl_Encoding tclIdentityEncoding = NULL; /* * The following variable is used in the sparse matrix code for a @@ -652,7 +652,10 @@ TclFinalizeEncodingSubsystem(void) Tcl_MutexLock(&encodingMutex); encodingsInitialized = 0; FreeEncoding(systemEncoding); + systemEncoding = NULL; + defaultEncoding = NULL; FreeEncoding(tclIdentityEncoding); + tclIdentityEncoding = NULL; hPtr = Tcl_FirstHashEntry(&encodingTable, &search); while (hPtr != NULL) { @@ -2984,7 +2987,9 @@ TableFreeProc( */ ckfree(dataPtr->toUnicode); + dataPtr->toUnicode = NULL; ckfree(dataPtr->fromUnicode); + dataPtr->fromUnicode = NULL; ckfree(dataPtr); } @@ -3457,6 +3462,7 @@ EscapeFreeProc( subTablePtr = dataPtr->subTables; for (i = 0; i < dataPtr->numSubTables; i++) { FreeEncoding((Tcl_Encoding) subTablePtr->encodingPtr); + subTablePtr->encodingPtr = NULL; subTablePtr++; } } |