diff options
author | Victor Stinner <vstinner@redhat.com> | 2019-03-13 16:55:01 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-13 16:55:01 (GMT) |
commit | 9776b0636ae39668d3ce1c006d4be01dad01bf9f (patch) | |
tree | 4e51efb7dfc17dee9f91909d60c4bb66e915b3ff /Misc | |
parent | 86900a49000c4a96ad1dc34e49d8af4245b08843 (diff) | |
download | cpython-9776b0636ae39668d3ce1c006d4be01dad01bf9f.zip cpython-9776b0636ae39668d3ce1c006d4be01dad01bf9f.tar.gz cpython-9776b0636ae39668d3ce1c006d4be01dad01bf9f.tar.bz2 |
bpo-36262: Fix _Py_dg_strtod() memory leak (goto undfl) (GH-12276)
Fix an unlikely memory leak on conversion from string to float in the
function _Py_dg_strtod() used by float(str), complex(str),
pickle.load(), marshal.load(), etc.
Fix an unlikely memory leak in _Py_dg_strtod() on "undfl:" label:
rewrite memory management in this function to always release all
memory before exiting the function. Initialize variables to NULL, and
set them to NULL after calling Bfree() at the "cont:" label.
Note: Bfree(NULL) is well defined: it does nothing.
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/Core and Builtins/2019-03-11-15-37-33.bpo-36262.v3N6Fz.rst | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Core and Builtins/2019-03-11-15-37-33.bpo-36262.v3N6Fz.rst b/Misc/NEWS.d/next/Core and Builtins/2019-03-11-15-37-33.bpo-36262.v3N6Fz.rst new file mode 100644 index 0000000..b5ccc95 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2019-03-11-15-37-33.bpo-36262.v3N6Fz.rst @@ -0,0 +1,3 @@ +Fix an unlikely memory leak on conversion from string to float in the function +``_Py_dg_strtod()`` used by ``float(str)``, ``complex(str)``, +:func:`pickle.load`, :func:`marshal.load`, etc. |