summaryrefslogtreecommitdiffstats
path: root/generic/tclCompile.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2010-10-06 18:38:43 (GMT)
committerdgp <dgp@users.sourceforge.net>2010-10-06 18:38:43 (GMT)
commit6f2e8c77532df55d185274fbc12464f5f539d08e (patch)
treea9dd047e09a12188519488e348aca5875b396335 /generic/tclCompile.c
parent5e88dcc48d62ffa8d6a6cb309bf9640936629494 (diff)
downloadtcl-6f2e8c77532df55d185274fbc12464f5f539d08e.zip
tcl-6f2e8c77532df55d185274fbc12464f5f539d08e.tar.gz
tcl-6f2e8c77532df55d185274fbc12464f5f539d08e.tar.bz2
* generic/tclCompile.c: Prevent writing to the intrep fields of a
* tests/subst.test: freed Tcl_Obj. [Bug 3081065]
Diffstat (limited to 'generic/tclCompile.c')
-rw-r--r--generic/tclCompile.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index a34966d..b250420 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCompile.c,v 1.188 2010/09/27 19:42:38 msofer Exp $
+ * RCS: @(#) $Id: tclCompile.c,v 1.189 2010/10/06 18:38:44 dgp Exp $
*/
#include "tclInt.h"
@@ -1050,12 +1050,12 @@ FreeSubstCodeInternalRep(
{
register ByteCode *codePtr = objPtr->internalRep.ptrAndLongRep.ptr;
+ objPtr->typePtr = NULL;
+ objPtr->internalRep.otherValuePtr = NULL;
codePtr->refCount--;
if (codePtr->refCount <= 0) {
TclCleanupByteCode(codePtr);
}
- objPtr->typePtr = NULL;
- objPtr->internalRep.otherValuePtr = NULL;
}
/*