summaryrefslogtreecommitdiffstats
path: root/generic/tclEncoding.c
diff options
context:
space:
mode:
authornijtmans <nijtmans@noemail.net>2009-11-19 21:56:34 (GMT)
committernijtmans <nijtmans@noemail.net>2009-11-19 21:56:34 (GMT)
commit444c1bda1f58027ab475ad39acde8d6626cab55a (patch)
tree7f7c1c13c283ca255daa7ffc582cde6016b4e1ac /generic/tclEncoding.c
parent2b4cc3204a7bc7ed947fd3eba64c4223996cdc45 (diff)
downloadtcl-444c1bda1f58027ab475ad39acde8d6626cab55a.zip
tcl-444c1bda1f58027ab475ad39acde8d6626cab55a.tar.gz
tcl-444c1bda1f58027ab475ad39acde8d6626cab55a.tar.bz2
Updated freeIntRepProc routines so
that they set the typePtr field to NULL so that the Tcl_Obj is not left in an inconsistent state. [Bug 2857044] FossilOrigin-Name: 803df0782287b6a7bb33d7becc581c92474b3e5d
Diffstat (limited to 'generic/tclEncoding.c')
-rw-r--r--generic/tclEncoding.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c
index 2188256..7e5466c 100644
--- a/generic/tclEncoding.c
+++ b/generic/tclEncoding.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclEncoding.c,v 1.67 2009/11/16 17:38:08 ferrieux Exp $
+ * RCS: @(#) $Id: tclEncoding.c,v 1.68 2009/11/19 21:56:34 nijtmans Exp $
*/
#include "tclInt.h"
@@ -336,6 +336,7 @@ FreeEncodingIntRep(
Tcl_Obj *objPtr)
{
Tcl_FreeEncoding((Tcl_Encoding) objPtr->internalRep.otherValuePtr);
+ objPtr->typePtr = NULL;
}
/*
@@ -3394,7 +3395,7 @@ EscapeFreeProc(
* weak reference in the toplevel encodingTable (ie they don't have a +1
* refcount for this), and unpredictable nuking order could remove them
* from under the following loop's feet [Bug 2891556].
- *
+ *
* The encodingsInitialized flag, being reset on entry to TFES, can serve
* as a "not in finalization" test.
*/