diff options
author | andreas_kupries <akupries@shaw.ca> | 2008-07-03 17:38:18 (GMT) |
---|---|---|
committer | andreas_kupries <akupries@shaw.ca> | 2008-07-03 17:38:18 (GMT) |
commit | c2bfa8163f506cbd34bafe409538015bb0cc4c84 (patch) | |
tree | 0789bc0ac313baeead933b24e12fd258eaefcd8e | |
parent | c85e6bdb61efe2c36d91fc918ba02cc00eaa4b21 (diff) | |
download | tcl-c2bfa8163f506cbd34bafe409538015bb0cc4c84.zip tcl-c2bfa8163f506cbd34bafe409538015bb0cc4c84.tar.gz tcl-c2bfa8163f506cbd34bafe409538015bb0cc4c84.tar.bz2 |
* generic/tclIORChan.c (InvokeTclMethod): Fixed the memory leak
reported in [Bug 1987821]. Thanks to Miguel for the rpeort and
Don Porter for tracking the cause down.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | generic/tclIORChan.c | 14 |
2 files changed, 19 insertions, 1 deletions
@@ -1,3 +1,9 @@ +2008-07-03 Andreas Kupries <andreask@activestate.com> + + * generic/tclIORChan.c (InvokeTclMethod): Fixed the memory leak + reported in [Bug 1987821]. Thanks to Miguel for the rpeort and + Don Porter for tracking the cause down. + 2008-07-03 Don Porter <dgp@users.sourceforge.net> * library/package.tcl: Removed [file readable] testing from diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c index 51c5e61..d13b9aac 100644 --- a/generic/tclIORChan.c +++ b/generic/tclIORChan.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIORChan.c,v 1.28.2.4 2008/05/03 21:06:02 das Exp $ + * RCS: @(#) $Id: tclIORChan.c,v 1.28.2.5 2008/07/03 17:38:18 andreas_kupries Exp $ */ #include <tclInt.h> @@ -2126,6 +2126,18 @@ InvokeTclMethod( *resultObjPtr = resObj; Tcl_IncrRefCount(resObj); } + + /* + * Cleanup of the dynamic parts of the command. + */ + + if (argOneObj) { + Tcl_DecrRefCount(argOneObj); + if (argTwoObj) { + Tcl_DecrRefCount(argTwoObj); + } + } + return TCL_ERROR; } |