diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2020-12-27 12:46:59 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2020-12-27 12:46:59 -0500 |
commit | a78f0158a28734f965218b834ea8c0b166b7353f (patch) | |
tree | dca70268e2a41d49658e7eed783c6fc243d119cd /Python/pystrtod.c | |
parent | ec8e6895a3ce9cd69b6ceb75a15fcc74d4a522dc (diff) | |
parent | bf64d9064ab641b1ef9a0c4bda097ebf1204faf4 (diff) | |
download | cpython-git-revert-23107-revert-13893-fix-issue-37193.tar.gz |
Merge branch 'master' into revert-23107-revert-13893-fix-issue-37193revert-23107-revert-13893-fix-issue-37193
Diffstat (limited to 'Python/pystrtod.c')
-rw-r--r-- | Python/pystrtod.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/pystrtod.c b/Python/pystrtod.c index 1c8202c776..9145d4eba1 100644 --- a/Python/pystrtod.c +++ b/Python/pystrtod.c @@ -255,7 +255,7 @@ _PyOS_ascii_strtod(const char *nptr, char **endptr) char *copy, *c; /* Create a copy of the input, with the '.' converted to the locale-specific decimal point */ - copy = (char *)PyMem_MALLOC(end - digits_pos + + copy = (char *)PyMem_Malloc(end - digits_pos + 1 + decimal_point_len); if (copy == NULL) { *endptr = (char *)nptr; @@ -286,7 +286,7 @@ _PyOS_ascii_strtod(const char *nptr, char **endptr) (fail_pos - copy); } - PyMem_FREE(copy); + PyMem_Free(copy); } else { |