summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2005-07-16 21:29:19 (GMT)
committerKevin B Kenny <kennykb@acm.org>2005-07-16 21:29:19 (GMT)
commit7cf3d12825fec27e1d0cd8382bef5c2dccc330f0 (patch)
tree57dd18355d3259b98bd483723daa69692440cac7
parent946b735b24827b141d661dd438ebd89193aa4d2d (diff)
downloadtcl-7cf3d12825fec27e1d0cd8382bef5c2dccc330f0.zip
tcl-7cf3d12825fec27e1d0cd8382bef5c2dccc330f0.tar.gz
tcl-7cf3d12825fec27e1d0cd8382bef5c2dccc330f0.tar.bz2
Tk Bug 1227781
-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;
}