diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2011-08-04 14:13:33 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2011-08-04 14:13:33 (GMT) |
commit | a789207beed7bac51e02a7710720d6c550e7014d (patch) | |
tree | 3631427f35da8f0fa86dd03ea08eec56a20a20ed /generic | |
parent | 2d023b4b58bc316adcf9e9721273392145c60fc2 (diff) | |
download | tcl-a789207beed7bac51e02a7710720d6c550e7014d.zip tcl-a789207beed7bac51e02a7710720d6c550e7014d.tar.gz tcl-a789207beed7bac51e02a7710720d6c550e7014d.tar.bz2 |
More memleak plugging.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclAssembly.c | 17 |
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); |