summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--generic/tclNamesp.c9
2 files changed, 12 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index d0eabf3..0081711 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,6 +15,10 @@
* generic/tclCompExpr.c (ParseExpr): Memory leak in error case; the
literal Tcl_Obj was not getting freed. [Bug 1705778, leak #1 (new)]
+ * 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].
+
2007-04-24 Kevin B. Kenny <kennykb@acm.org>
* generic/tclExecute.c (TclExecuteByteCode): Plugged six memory
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);
}
}
}