summaryrefslogtreecommitdiffstats
path: root/generic/tclIORChan.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclIORChan.c')
-rw-r--r--generic/tclIORChan.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c
index fcb40a7..2ea4870 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.19 2007/02/20 23:24:04 nijtmans Exp $
+ * RCS: @(#) $Id: tclIORChan.c,v 1.20 2007/02/26 23:27:49 andreas_kupries Exp $
*/
#include <tclInt.h>
@@ -1860,6 +1860,9 @@ NewReflectedChannel(
i++; /* Skip placeholder for method */
+ /*
+ * [SF Bug 1667990] See [x] in FreeReflectedChannel for release
+ */
rcPtr->argv[i] = handleObj;
Tcl_IncrRefCount(handleObj);
@@ -1936,6 +1939,12 @@ FreeReflectedChannel(rcPtr)
Tcl_DecrRefCount(rcPtr->argv[i]);
}
+ /*
+ * [SF Bug 1667990] See [x] in NewReflectedChannel for lock
+ * n+1 = argc-1.
+ */
+ Tcl_IncrRefCount(rcPtr->argv[n+1]);
+
ckfree((char*) rcPtr->argv);
ckfree((char*) rcPtr);
}