summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2016-01-28 13:42:33 (GMT)
committerdgp <dgp@users.sourceforge.net>2016-01-28 13:42:33 (GMT)
commit628d65bf41110410632aa9f7e3e4a42c67603f15 (patch)
treea3f2ea967ad91ff9d4f618f8221e0e7f0de4ebf9 /generic
parentcd18aecedc21c53646faaf9da9aa1cd2209eac2e (diff)
downloadtcl-628d65bf41110410632aa9f7e3e4a42c67603f15.zip
tcl-628d65bf41110410632aa9f7e3e4a42c67603f15.tar.gz
tcl-628d65bf41110410632aa9f7e3e4a42c67603f15.tar.bz2
RefineApproximation() leaked twoMv and twoMd in one of its exits.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclStrToD.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/generic/tclStrToD.c b/generic/tclStrToD.c
index cff9bdd..d05fe5d 100644
--- a/generic/tclStrToD.c
+++ b/generic/tclStrToD.c
@@ -1903,6 +1903,8 @@ RefineApproximation(
rteSignificand = frexp(approxResult, &rteExponent);
rteSigWide = (Tcl_WideInt) ldexp(rteSignificand, FP_PRECISION);
if ((rteSigWide & 1) == 0) {
+ mp_clear(&twoMd);
+ mp_clear(&twoMv);
return approxResult;
}
}