From bb9116d73ba9d1c0da04e53d1451fffe964ee876 Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 28 Sep 2001 00:41:20 +0000 Subject: * Added Tcl_Preserve() and Tcl_Release() to fix segfault introduced by the 2001-09-26 changes. [Bug 465494] --- ChangeLog | 4 ++++ generic/tclIO.c | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 711d6b2..d6706ad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2001-09-27 Don Porter + * generic/tclIO.c (ChannelTimerProc): Added Tcl_Preserve() + and Tcl_Release() to fix segfault introduced by the 2001-09-26 + changes. [Bug 465494] + * doc/TCL_MEM_DEBUG.3: Updated out-of-date reference to #define GUARD_SIZE. diff --git a/generic/tclIO.c b/generic/tclIO.c index 7f5cc30..5233d73 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.c,v 1.36 2001/09/27 02:12:19 andreas_kupries Exp $ + * RCS: @(#) $Id: tclIO.c,v 1.37 2001/09/28 00:41:20 dgp Exp $ */ #include "tclInt.h" @@ -6735,10 +6735,11 @@ ChannelTimerProc(clientData) (Tcl_ChannelBlockModeProc(chanPtr->typePtr) == NULL)) { statePtr->flags |= CHANNEL_TIMER_FEV; } - + Tcl_Preserve(statePtr); Tcl_NotifyChannel((Tcl_Channel)chanPtr, TCL_READABLE); statePtr->flags &= ~CHANNEL_TIMER_FEV; + Tcl_Release(statePtr); } else { statePtr->timer = NULL; UpdateInterest(chanPtr); -- cgit v0.12