diff options
author | andreas_kupries <andreas_kupries@noemail.net> | 2007-02-26 23:27:48 (GMT) |
---|---|---|
committer | andreas_kupries <andreas_kupries@noemail.net> | 2007-02-26 23:27:48 (GMT) |
commit | 46b110748ff91057010aa3a7bcf11be3a2e6f5ed (patch) | |
tree | a6a3d330417ce2cb6db9fffbc0c488de4290e871 /generic/tclIORChan.c | |
parent | c848a8135c2b8c8a6bfd8bf5fd41e67f48ce809c (diff) | |
download | tcl-46b110748ff91057010aa3a7bcf11be3a2e6f5ed.zip tcl-46b110748ff91057010aa3a7bcf11be3a2e6f5ed.tar.gz tcl-46b110748ff91057010aa3a7bcf11be3a2e6f5ed.tar.bz2 |
* generic/tclIORChan.c (FreeReflectedChannel): Added the missing
refcount release between NewRC and FreeRC for the channel handle
object, spotted by Don Porter. This fixes the bug 1667990.
FossilOrigin-Name: 0f345a2f87287bd89c9bcdfc9af9c78870f607ec
Diffstat (limited to 'generic/tclIORChan.c')
-rw-r--r-- | generic/tclIORChan.c | 11 |
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); } |