Add more missing PyErr_NoMemory() after failled memory allocs

This commit is contained in:
Neal Norwitz 2003-02-11 23:05:40 +00:00
parent 42f08ac1e3
commit ec74f2fda7
3 changed files with 4 additions and 4 deletions

View file

@ -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;