diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2007-05-16 04:33:50 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2007-05-16 04:33:50 (GMT) |
commit | d501d1fbc480350daa251905a22c6ab79f1a82c8 (patch) | |
tree | 55d39a95eaa4f65b0a831badfc6a484d4784a4b8 /Objects/intobject.c | |
parent | a09a96a5440144f926c69250dab7b9bbf06bd789 (diff) | |
download | cpython-d501d1fbc480350daa251905a22c6ab79f1a82c8.zip cpython-d501d1fbc480350daa251905a22c6ab79f1a82c8.tar.gz cpython-d501d1fbc480350daa251905a22c6ab79f1a82c8.tar.bz2 |
Port rev 55353 from Guido:
Add what looks like a necessary call to PyErr_NoMemory() when PyMem_MALLOC()
fails.
Will backport.
Diffstat (limited to 'Objects/intobject.c')
-rw-r--r-- | Objects/intobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/intobject.c b/Objects/intobject.c index 9333a55..f72aea0 100644 --- a/Objects/intobject.c +++ b/Objects/intobject.c @@ -393,7 +393,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); |