mirror of
https://github.com/python/cpython.git
synced 2026-04-23 20:31:12 +00:00
bpo-35436: Add missing PyErr_NoMemory() calls and other minor bug fixes. (GH-11015) (GH-11020)
(cherry picked from commit 4c49da0cb7)
This commit is contained in:
parent
2db190bb35
commit
602d307ac5
16 changed files with 109 additions and 24 deletions
|
|
@ -398,6 +398,9 @@ _Py_string_to_number_with_underscores(
|
|||
}
|
||||
|
||||
dup = PyMem_Malloc(orig_len + 1);
|
||||
if (dup == NULL) {
|
||||
return PyErr_NoMemory();
|
||||
}
|
||||
end = dup;
|
||||
prev = '\0';
|
||||
last = s + orig_len;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue