summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2007-04-24 17:50:52 (GMT)
committerdgp <dgp@users.sourceforge.net>2007-04-24 17:50:52 (GMT)
commita80170238fbb5ca2234cb26362941b0d69410df3 (patch)
tree6bda77d44c29351cf7bd3677a801b8cd17533584 /generic
parentdc4a6bd185824428dbdbeb43e9ef2888dd8da7c8 (diff)
downloadtcl-a80170238fbb5ca2234cb26362941b0d69410df3.zip
tcl-a80170238fbb5ca2234cb26362941b0d69410df3.tar.gz
tcl-a80170238fbb5ca2234cb26362941b0d69410df3.tar.bz2
* generic/tclNamesp.c (Tcl_DeleteNamespace): Corrected flaw in the
flag marking scheme to be sure that global namespaces are freed when their interp is deleted. [Bug 1705778].
Diffstat (limited to 'generic')
-rw-r--r--generic/tclNamesp.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c
index b4c7a4a..3f6ecf8 100644
--- a/generic/tclNamesp.c
+++ b/generic/tclNamesp.c
@@ -22,7 +22,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclNamesp.c,v 1.132 2007/04/20 06:10:58 kennykb Exp $
+ * RCS: @(#) $Id: tclNamesp.c,v 1.133 2007/04/24 17:50:53 dgp Exp $
*/
#include "tclInt.h"
@@ -1035,6 +1035,13 @@ Tcl_DeleteNamespace(
EstablishErrorInfoTraces(NULL, nsPtr->interp, NULL, NULL, 0);
EstablishErrorCodeTraces(NULL, nsPtr->interp, NULL, NULL, 0);
+
+ /*
+ * We didn't really kill it, so remove the KILLED marks, so
+ * it can get killed later, avoiding mem leaks
+ */
+
+ nsPtr->flags &= ~(NS_DYING|NS_KILLED);
}
}
}