From c3ae410bfd9c50b4b93c65bb20d96aca055c8c81 Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Wed, 30 Nov 2005 14:48:03 +0000 Subject: fixed bad refcount that corrupted heap --- ChangeLog | 6 ++++++ generic/tclClock.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e7d89d4..eb7467c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-11-30 Kevin Kenny + + * generic/tclClock.c: Fixed a bad refcount in previous commit + that led to a corrupted heap. Thanks to Miguel Sofer for pointing + out this bug. + 2005-11-29 Kevin Kenny * generic/tclBasic.c: Moved a big part of [clock format] down diff --git a/generic/tclClock.c b/generic/tclClock.c index 3dc93fa..a52ca26 100644 --- a/generic/tclClock.c +++ b/generic/tclClock.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclClock.c,v 1.43 2005/11/29 22:50:58 kennykb Exp $ + * RCS: @(#) $Id: tclClock.c,v 1.44 2005/11/30 14:48:04 kennykb Exp $ */ #include "tclInt.h" @@ -233,6 +233,7 @@ TclClockInit( Tcl_CreateObjCommand(interp, "::tcl::clock::ConvertLocalToUTC", ClockConvertlocaltoutcObjCmd, (ClientData) data, ClockDeleteCmdProc); + ++data->refCount; Tcl_CreateObjCommand(interp, "::tcl::clock::GetDateFields", ClockGetdatefieldsObjCmd,(ClientData) data, ClockDeleteCmdProc); -- cgit v0.12