summaryrefslogtreecommitdiffstats
path: root/generic/tclNamesp.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2004-07-11 23:11:21 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2004-07-11 23:11:21 (GMT)
commit6570e4e99c3e50d63954e31e9c6810ed2f55698c (patch)
treec534498bcbfd48dae01aa399ea4862ecd3defc16 /generic/tclNamesp.c
parent6052b2df787cde54e20e2833c6a6dbaadb10bdd4 (diff)
downloadtcl-6570e4e99c3e50d63954e31e9c6810ed2f55698c.zip
tcl-6570e4e99c3e50d63954e31e9c6810ed2f55698c.tar.gz
tcl-6570e4e99c3e50d63954e31e9c6810ed2f55698c.tar.bz2
Another leak fix for [Bug 989093]
Diffstat (limited to 'generic/tclNamesp.c')
-rw-r--r--generic/tclNamesp.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c
index 88ad3bb..b1e2a8e 100644
--- a/generic/tclNamesp.c
+++ b/generic/tclNamesp.c
@@ -21,7 +21,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.40 2004/05/25 19:45:14 msofer Exp $
+ * RCS: @(#) $Id: tclNamesp.c,v 1.41 2004/07/11 23:11:22 dkf Exp $
*/
#include "tclInt.h"
@@ -5262,7 +5262,15 @@ BuildEnsembleConfig(ensemblePtr)
/*
* Remove pre-existing table.
*/
+ Tcl_HashSearch search;
+
ckfree((char *)ensemblePtr->subcommandArrayPtr);
+ hPtr = Tcl_FirstHashEntry(hash, &search);
+ while (hPtr != NULL) {
+ Tcl_Obj *prefixObj = (Tcl_Obj *) Tcl_GetHashValue(hPtr);
+ Tcl_DecrRefCount(prefixObj);
+ hPtr = Tcl_NextHashEntry(&search);
+ }
Tcl_DeleteHashTable(hash);
Tcl_InitHashTable(hash, TCL_STRING_KEYS);
}