diff options
Diffstat (limited to 'Objects/unicodeobject.c')
-rw-r--r-- | Objects/unicodeobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 6a358da6f1..14318f67d3 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -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; |