summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rwxr-xr-xgeneric/tclStrToD.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 2f2bc93..3188acd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-07-16 Kevin B. Kenny <kennykb@acm.org>
+
+ * generic/tclStrToD.c (RefineResult): Plugged a stupid memory
+ leak in RefineResult (called from Tcl_StrToD). [Tk Bug 1227781]
+
2005-07-15 Kevin B. Kenny <kennykb@acm.org>
* generic/tclClock.c (TclClockLocaltimeObjCmd,ThreadSafeLocalTime):
diff --git a/generic/tclStrToD.c b/generic/tclStrToD.c
index ab2701d..b28a60e 100755
--- a/generic/tclStrToD.c
+++ b/generic/tclStrToD.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: tclStrToD.c,v 1.6 2005/07/05 11:37:02 dkf Exp $
+ * RCS: @(#) $Id: tclStrToD.c,v 1.7 2005/07/16 21:29:23 kennykb Exp $
*
*----------------------------------------------------------------------
*/
@@ -675,6 +675,8 @@ RefineResult(double approxResult, /* Approximate result of conversion. */
*/
if (mp_cmp_mag(&twoMd, &twoMv) == MP_LT) {
+ mp_clear(&twoMd);
+ mp_clear(&twoMv);
return approxResult;
}