summaryrefslogtreecommitdiffstats
path: root/generic/tclIORChan.c
diff options
context:
space:
mode:
authorandreas_kupries <andreas_kupries@noemail.net>2008-07-03 17:38:17 (GMT)
committerandreas_kupries <andreas_kupries@noemail.net>2008-07-03 17:38:17 (GMT)
commitbc69a4f9b161e3f2452673815f348212d086f635 (patch)
tree0789bc0ac313baeead933b24e12fd258eaefcd8e /generic/tclIORChan.c
parentaa7d6384f051efc18575cf16b11b5ba6b0268cb6 (diff)
downloadtcl-bc69a4f9b161e3f2452673815f348212d086f635.zip
tcl-bc69a4f9b161e3f2452673815f348212d086f635.tar.gz
tcl-bc69a4f9b161e3f2452673815f348212d086f635.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. FossilOrigin-Name: 3455b4671cc42ae186488750630b861d80d5eb48
Diffstat (limited to 'generic/tclIORChan.c')
-rw-r--r--generic/tclIORChan.c14
1 files changed, 13 insertions, 1 deletions
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;
}