summaryrefslogtreecommitdiffstats
path: root/generic/tclBasic.c
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2004-07-05 22:40:58 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2004-07-05 22:40:58 (GMT)
commitfa306be9d7adf64d777414f45a59dd7b332b90ac (patch)
treef3a58df5284412aa94acfbf00c2e5ee72de51503 /generic/tclBasic.c
parent40431793ba19022873eb80b047ac6c72e52e98c8 (diff)
downloadtcl-fa306be9d7adf64d777414f45a59dd7b332b90ac.zip
tcl-fa306be9d7adf64d777414f45a59dd7b332b90ac.tar.gz
tcl-fa306be9d7adf64d777414f45a59dd7b332b90ac.tar.bz2
* generic/tclBasic.c (DeleteInterpProc): fix for [Bug 983660],
found by pspjuth. Tear down the global namespace before freeing the interp handle, to allow the bytecodes to free their non-shared literals. * generic/tclLiteral.c (TclReleaseLiteral): moved special code for self-ref so that it is also used for non-shared literals. Possible bug found by inspection.
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r--generic/tclBasic.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 6b9058b..aec8a18 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclBasic.c,v 1.106 2004/06/14 22:14:11 kennykb Exp $
+ * RCS: @(#) $Id: tclBasic.c,v 1.107 2004/07/05 22:41:01 msofer Exp $
*/
#include "tclInt.h"
@@ -980,8 +980,6 @@ DeleteInterpProc(interp)
Tcl_Panic("DeleteInterpProc called on interpreter not marked deleted");
}
- TclHandleFree(iPtr->handle);
-
/*
* Shut down all limit handler callback scripts that call back
* into this interpreter. Then eliminate all limit handlers for
@@ -998,9 +996,13 @@ DeleteInterpProc(interp)
*
* Dismantle the namespace here, before we clear the assocData. If any
* background errors occur here, they will be deleted below.
+ *
+ * Dismantle the namespace before freeing the iPtr->handle, to insure
+ * that non-shared literals are freed properly [Bug 983660].
*/
TclTeardownNamespace(iPtr->globalNsPtr);
+ TclHandleFree(iPtr->handle);
/*
* Delete all the hidden commands.