summaryrefslogtreecommitdiffstats
path: root/generic/tclBasic.c
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2007-03-23 19:59:34 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2007-03-23 19:59:34 (GMT)
commit12eaf38453be7e97fa3bddfdd337d03921be6a22 (patch)
treef7394b75b20ead30fc9a42e561888d6586801fe9 /generic/tclBasic.c
parente72387ba327faa197a65c9f58f06614ef4407226 (diff)
downloadtcl-12eaf38453be7e97fa3bddfdd337d03921be6a22.zip
tcl-12eaf38453be7e97fa3bddfdd337d03921be6a22.tar.gz
tcl-12eaf38453be7e97fa3bddfdd337d03921be6a22.tar.bz2
* generic/tclBasic.c (DeleteInterpProc): pop the root frame
pointer before deleting the global namespace [Bug 1658572]
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r--generic/tclBasic.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 548bcc3..43e570e 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.238 2007/03/19 16:59:08 dgp Exp $
+ * RCS: @(#) $Id: tclBasic.c,v 1.239 2007/03/23 19:59:34 msofer Exp $
*/
#include "tclInt.h"
@@ -1214,16 +1214,17 @@ DeleteInterpProc(
}
/*
- * Finish deleting the global namespace.
+ * Pop the root frame pointer and finish deleting the global
+ * namespace. The order is important [Bug 1658572].
*/
- Tcl_DeleteNamespace((Tcl_Namespace *) iPtr->globalNsPtr);
if (iPtr->framePtr != iPtr->rootFramePtr) {
Tcl_Panic("DeleteInterpProc: popping rootCallFrame with other frames on top");
}
Tcl_PopCallFrame(interp);
ckfree((char *)iPtr->rootFramePtr);
iPtr->rootFramePtr = NULL;
+ Tcl_DeleteNamespace((Tcl_Namespace *) iPtr->globalNsPtr);
/*
* Free up the result *after* deleting variables, since variable deletion