mirror of
https://github.com/python/cpython.git
synced 2025-07-12 13:55:34 +00:00
Add more missing PyErr_NoMemory() after failled memory allocs
This commit is contained in:
parent
42f08ac1e3
commit
ec74f2fda7
3 changed files with 4 additions and 4 deletions
|
@ -6661,7 +6661,7 @@ unicode_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
|||
if (pnew->str == NULL) {
|
||||
_Py_ForgetReference((PyObject *)pnew);
|
||||
PyObject_Del(pnew);
|
||||
return NULL;
|
||||
return PyErr_NoMemory();
|
||||
}
|
||||
Py_UNICODE_COPY(pnew->str, tmp->str, n+1);
|
||||
pnew->length = n;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue