summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2001-09-28 00:41:20 (GMT)
committerdgp <dgp@users.sourceforge.net>2001-09-28 00:41:20 (GMT)
commitbb9116d73ba9d1c0da04e53d1451fffe964ee876 (patch)
tree48f7d05c53ea3fa8fea7f37e7aabc9a17cedf25a
parentf5bea294b4d3f0fb680a0a6c59978540856c0e46 (diff)
downloadtcl-bb9116d73ba9d1c0da04e53d1451fffe964ee876.zip
tcl-bb9116d73ba9d1c0da04e53d1451fffe964ee876.tar.gz
tcl-bb9116d73ba9d1c0da04e53d1451fffe964ee876.tar.bz2
* Added Tcl_Preserve()
and Tcl_Release() to fix segfault introduced by the 2001-09-26 changes. [Bug 465494]
-rw-r--r--ChangeLog4
-rw-r--r--generic/tclIO.c5
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 <dgp@users.sourceforge.net>
+ * 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);