diff options
author | nijtmans <nijtmans> | 2009-11-19 21:56:34 (GMT) |
---|---|---|
committer | nijtmans <nijtmans> | 2009-11-19 21:56:34 (GMT) |
commit | c9d79e955d95910cce7d1a96e2b1b7e128c51412 (patch) | |
tree | 7f7c1c13c283ca255daa7ffc582cde6016b4e1ac /generic/tclEncoding.c | |
parent | 22dcce7f92195e6d1e053bc88c37a0718d2ee0c7 (diff) | |
download | tcl-c9d79e955d95910cce7d1a96e2b1b7e128c51412.zip tcl-c9d79e955d95910cce7d1a96e2b1b7e128c51412.tar.gz tcl-c9d79e955d95910cce7d1a96e2b1b7e128c51412.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.c | 5 |
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. */ |