diff options
author | dgp <dgp@users.sourceforge.net> | 2014-04-24 15:27:58 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2014-04-24 15:27:58 (GMT) |
commit | 45659eebd25bc6f9a5d677188fea29fbf87792aa (patch) | |
tree | 9a00b0d5759743211bd698082450c791ccf436b1 /generic | |
parent | 3ec273770b6c93b8a1281ba9412eda19ac3d3184 (diff) | |
download | tcl-45659eebd25bc6f9a5d677188fea29fbf87792aa.zip tcl-45659eebd25bc6f9a5d677188fea29fbf87792aa.tar.gz tcl-45659eebd25bc6f9a5d677188fea29fbf87792aa.tar.bz2 |
Make sure the ReflectedChannel struct is freed in the handler thread,
where it was allocated. This constraint allows the struct to safely
hold Tcl_Obj values, which has been convenient for storing callback commands.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclIORChan.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c index e462f61..94428bb 100644 --- a/generic/tclIORChan.c +++ b/generic/tclIORChan.c @@ -1145,6 +1145,7 @@ ReflectClose( if (result != TCL_OK) { FreeReceivedError(&p); } + return EOK; } #endif @@ -1169,8 +1170,6 @@ ReflectClose( Tcl_DeleteEvents(ReflectEventDelete, rcPtr); - Tcl_EventuallyFree(rcPtr, (Tcl_FreeProc *) FreeReflectedChannel); - if (result != TCL_OK) { PassReceivedErrorInterp(interp, &p); } @@ -2903,6 +2902,7 @@ ForwardProc( Tcl_GetChannelName(rcPtr->chan)); Tcl_DeleteHashEntry(hPtr); + Tcl_EventuallyFree(rcPtr, (Tcl_FreeProc *) FreeReflectedChannel); break; case ForwardedInput: { |