summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--generic/tclEncoding.c5
2 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index f9d4ae6..1db1262 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,12 @@
* tests/safe.test Fix safe-10.1 and safe-10.4 test cases,
making the wrong assumption that Tcltest
is a static package.
+ * generic/tclEncoding.c 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]
+
2009-11-19 Don Porter <dgp@users.sourceforge.net>
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.
*/