mirror of
https://github.com/python/cpython.git
synced 2025-09-24 17:33:29 +00:00
Issue #16592: stringlib_bytes_join doesn't raise MemoryError on allocation failure
This commit is contained in:
parent
17ad40e46e
commit
5f7e8dab11
2 changed files with 4 additions and 0 deletions
|
@ -43,6 +43,7 @@ STRINGLIB(bytes_join)(PyObject *sep, PyObject *iterable)
|
|||
buffers = PyMem_NEW(Py_buffer, seqlen);
|
||||
if (buffers == NULL) {
|
||||
Py_DECREF(seq);
|
||||
PyErr_NoMemory();
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue