diff options
author | mig <mig> | 2011-08-01 17:15:19 (GMT) |
---|---|---|
committer | mig <mig> | 2011-08-01 17:15:19 (GMT) |
commit | 7cafb9729cb8db722600b80cd3b1c9536ca46519 (patch) | |
tree | 8f01d54611133845b2680006211754b6c63c5e0a | |
parent | 666118190e342c616ccffff20d1f7d0f14abe242 (diff) | |
download | tcl-7cafb9729cb8db722600b80cd3b1c9536ca46519.zip tcl-7cafb9729cb8db722600b80cd3b1c9536ca46519.tar.gz tcl-7cafb9729cb8db722600b80cd3b1c9536ca46519.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.
-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; |