Commit a41d84c1 authored by Neal Norwitz's avatar Neal Norwitz

Add what looks like a necessary call to PyErr_NoMemory() when PyMem_MALLOC()

fails.
parent d36ccdb8
......@@ -394,7 +394,7 @@ PyInt_FromUnicode(Py_UNICODE *s, Py_ssize_t length, int base)
char *buffer = (char *)PyMem_MALLOC(length+1);
if (buffer == NULL)
return NULL;
return PyErr_NoMemory();
if (PyUnicode_EncodeDecimal(s, length, buffer, NULL)) {
PyMem_FREE(buffer);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment