summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@noemail.net>2007-05-15 18:32:14 (GMT)
committerdgp <dgp@noemail.net>2007-05-15 18:32:14 (GMT)
commitb50bd11f761169b1502d4fc53a9e9c71835d6c6b (patch)
tree003f5dca123ecd69d12a4c32f617c1ffacd41e46
parent688ff0ba55abef2eb7578004de3c56cdce008d97 (diff)
downloadtcl-b50bd11f761169b1502d4fc53a9e9c71835d6c6b.zip
tcl-b50bd11f761169b1502d4fc53a9e9c71835d6c6b.tar.gz
tcl-b50bd11f761169b1502d4fc53a9e9c71835d6c6b.tar.bz2
* generic/tclNamesp.c: Plugged memory leak related to
[namespace delete ::]. [Bug 1716782] FossilOrigin-Name: 13bfe388224dbb90372889d1e58bede56081bf65
-rw-r--r--ChangeLog3
-rw-r--r--generic/tclNamesp.c10
2 files changed, 11 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 8379c96..d6df74f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2007-05-15 Don Porter <dgp@users.sourceforge.net>
+ * generic/tclNamesp.c: Plugged memory leak related to
+ [namespace delete ::]. [Bug 1716782]
+
* changes: updates for 8.4.15 release.
* win/tclWinReg.c: Bump to registry 1.1.5 to account
diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c
index 4f72e4c..8f42df6 100644
--- a/generic/tclNamesp.c
+++ b/generic/tclNamesp.c
@@ -19,7 +19,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.31.2.13 2006/11/28 22:20:02 andreas_kupries Exp $
+ * RCS: @(#) $Id: tclNamesp.c,v 1.31.2.14 2007/05/15 18:32:18 dgp Exp $
*/
#include "tclInt.h"
@@ -648,7 +648,13 @@ Tcl_DeleteNamespace(namespacePtr)
} else {
nsPtr->flags |= NS_DEAD;
}
- }
+ } else {
+ /*
+ * 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);
+ }
}
}