summaryrefslogtreecommitdiffstats
path: root/generic/tclAssembly.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2011-08-04 14:13:33 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2011-08-04 14:13:33 (GMT)
commita789207beed7bac51e02a7710720d6c550e7014d (patch)
tree3631427f35da8f0fa86dd03ea08eec56a20a20ed /generic/tclAssembly.c
parent2d023b4b58bc316adcf9e9721273392145c60fc2 (diff)
downloadtcl-a789207beed7bac51e02a7710720d6c550e7014d.zip
tcl-a789207beed7bac51e02a7710720d6c550e7014d.tar.gz
tcl-a789207beed7bac51e02a7710720d6c550e7014d.tar.bz2
More memleak plugging.
Diffstat (limited to 'generic/tclAssembly.c')
-rw-r--r--generic/tclAssembly.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/generic/tclAssembly.c b/generic/tclAssembly.c
index e12d0f8..7868882 100644
--- a/generic/tclAssembly.c
+++ b/generic/tclAssembly.c
@@ -1173,24 +1173,10 @@ FreeAssemblyEnv(
}
/*
- * Free the label hash.
- */
-
- while (1) {
- Tcl_HashEntry* hashEntry;
- Tcl_HashSearch hashSearch;
-
- hashEntry = Tcl_FirstHashEntry(&assemEnvPtr->labelHash, &hashSearch);
- if (hashEntry == NULL) {
- break;
- }
- Tcl_DeleteHashEntry(hashEntry);
- }
-
- /*
* Dispose what's left.
*/
+ Tcl_DeleteHashTable(&assemEnvPtr->labelHash);
TclStackFree(interp, assemEnvPtr->parsePtr);
TclStackFree(interp, assemEnvPtr);
}
@@ -2255,6 +2241,7 @@ FindLocalVar(
}
varNameStr = Tcl_GetStringFromObj(varNameObj, &varNameLen);
if (CheckNamespaceQualifiers(interp, varNameStr, varNameLen)) {
+ Tcl_DecrRefCount(varNameObj);
return -1;
}
localVar = TclFindCompiledLocal(varNameStr, varNameLen, 1, envPtr);