summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormig <mig>2011-08-01 17:15:19 (GMT)
committermig <mig>2011-08-01 17:15:19 (GMT)
commit7cafb9729cb8db722600b80cd3b1c9536ca46519 (patch)
tree8f01d54611133845b2680006211754b6c63c5e0a
parent666118190e342c616ccffff20d1f7d0f14abe242 (diff)
downloadtcl-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--ChangeLog6
-rw-r--r--generic/tclProc.c7
2 files changed, 13 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 7794884..b4d5502 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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;