summaryrefslogtreecommitdiffstats
path: root/generic/tclEncoding.c
diff options
context:
space:
mode:
authornijtmans <nijtmans>2009-11-19 21:56:34 (GMT)
committernijtmans <nijtmans>2009-11-19 21:56:34 (GMT)
commitd3d9d8cec6a88eb7f42a98be588eac1984d034d2 (patch)
tree7f7c1c13c283ca255daa7ffc582cde6016b4e1ac /generic/tclEncoding.c
parent52075c0160e6f3b4f11cac7abfa0bbc3e7ccd693 (diff)
downloadtcl-d3d9d8cec6a88eb7f42a98be588eac1984d034d2.zip
tcl-d3d9d8cec6a88eb7f42a98be588eac1984d034d2.tar.gz
tcl-d3d9d8cec6a88eb7f42a98be588eac1984d034d2.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]
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.
*/