diff options
author | mig <mig@noemail.net> | 2011-08-01 17:15:19 (GMT) |
---|---|---|
committer | mig <mig@noemail.net> | 2011-08-01 17:15:19 (GMT) |
commit | 66d62040dc62acfe98a759f42f1d49e8c48098bd (patch) | |
tree | 8f01d54611133845b2680006211754b6c63c5e0a | |
parent | d54ddc34c745bc551190af86f2e7e19e54e2014b (diff) | |
download | tcl-66d62040dc62acfe98a759f42f1d49e8c48098bd.zip tcl-66d62040dc62acfe98a759f42f1d49e8c48098bd.tar.gz tcl-66d62040dc62acfe98a759f42f1d49e8c48098bd.tar.bz2 |
* generic/tclProc.c (TclProcCompileProc): fix for leak of resolveInfo when recompiling procs, [Bug 3383616]. Thx go to Gustaf Neumann for detecting the bug and providing the fix.
FossilOrigin-Name: 5a334ac208171bb51cb237bff76aa328aace4ac0
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | generic/tclProc.c | 7 |
2 files changed, 13 insertions, 0 deletions
@@ -1,3 +1,9 @@ +2011-08-01 Miguel Sofer <msofer@users.sf.net> + + * generic/tclProc.c (TclProcCompileProc): fix for leak of + resolveInfo when recompiling procs, [Bug 3383616]. Thx go to + Gustaf Neumann for detecting the bug and providing the fix. + 2011-08-01 Donal K. Fellows <dkf@users.sf.net> * doc/tclvars.n (EXAMPLES): Added some examples of how some of the diff --git a/generic/tclProc.c b/generic/tclProc.c index a2de765..48f472f 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -2063,6 +2063,13 @@ TclProcCompileProc( CompiledLocal *toFree = clPtr; clPtr = clPtr->nextPtr; + if (toFree->resolveInfo) { + if (toFree->resolveInfo->deleteProc) { + toFree->resolveInfo->deleteProc(toFree->resolveInfo); + } else { + ckfree(toFree->resolveInfo); + } + } ckfree(toFree); } procPtr->numCompiledLocals = procPtr->numArgs; |