diff options
author | Mark Dickinson <dickinsm@gmail.com> | 2010-01-17 13:37:57 (GMT) |
---|---|---|
committer | Mark Dickinson <dickinsm@gmail.com> | 2010-01-17 13:37:57 (GMT) |
commit | 23df3d270d3572c43638d15b63684405b66887f7 (patch) | |
tree | 2103008213a5cb1b593797cd138d18b188b3b737 /Python/dtoa.c | |
parent | 724c5b2e7ffa2c676c17458ad55b3f13d4a9b6d4 (diff) | |
download | cpython-23df3d270d3572c43638d15b63684405b66887f7.zip cpython-23df3d270d3572c43638d15b63684405b66887f7.tar.gz cpython-23df3d270d3572c43638d15b63684405b66887f7.tar.bz2 |
Issue #7632: Fix a memory leak in _Py_dg_strtod.
Diffstat (limited to 'Python/dtoa.c')
-rw-r--r-- | Python/dtoa.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Python/dtoa.c b/Python/dtoa.c index 9eb8cdb..24ce922 100644 --- a/Python/dtoa.c +++ b/Python/dtoa.c @@ -1939,8 +1939,14 @@ _Py_dg_strtod(const char *s00, char **se) dval(&rv) += adj.d; if ((word0(&rv) & Exp_mask) >= Exp_msk1*(DBL_MAX_EXP+Bias-P)) { - if (word0(&rv0) == Big0 && word1(&rv0) == Big1) + if (word0(&rv0) == Big0 && word1(&rv0) == Big1) { + Bfree(bb); + Bfree(bd); + Bfree(bs); + Bfree(bd0); + Bfree(delta); goto ovfl; + } word0(&rv) = Big0; word1(&rv) = Big1; goto cont; |