From a789207beed7bac51e02a7710720d6c550e7014d Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 4 Aug 2011 14:13:33 +0000 Subject: More memleak plugging. --- ChangeLog | 14 +++++++------- generic/tclAssembly.c | 17 ++--------------- 2 files changed, 9 insertions(+), 22 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7d4e098..38914cf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,14 +1,15 @@ -<<<<<<< BEGIN MERGE CONFLICT: local copy shown first <<<<<<<<<<<<<<< +2011-08-04 Donal K. Fellows + + * generic/tclAssembly.c (FreeAssemblyEnv): [Bug 3384840]: Plug another + possible memory leak due to over-complex code for freeing the table of + labels. + 2011-08-04 Reinhard Max * generic/tclIOSock.c (TclCreateSocketAddress): Don't bother using AI_ADDRCONFIG for now, as it was causing problems in various situations. - -2011-08-02 Don Porter -======= COMMON ANCESTOR content follows ============================ -2011-08-02 Don Porter -======= MERGED IN content follows ================================== + 2011-08-04 Donal K. Fellows * generic/tclAssembly.c (AssembleOneLine, GetBooleanOperand) @@ -20,7 +21,6 @@ tests. 2011-08-02 Don Porter ->>>>>>> END MERGE CONFLICT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> * changes: Updates for 8.6b2 release. * tools/tcltk-man2html.tcl: Variable substitution botch. 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); -- cgit v0.12