diff options
author | Guido van Rossum <guido@python.org> | 2007-05-15 20:39:12 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-05-15 20:39:12 (GMT) |
commit | a28c291e92d30c64fdc034f3714be0d9158af225 (patch) | |
tree | 5956b5f4393f07f3bea24fa9cedd2eed2984e864 /Objects | |
parent | 0f0eb0b7fe2d6cddd2b49ba400464240f49d652e (diff) | |
download | cpython-a28c291e92d30c64fdc034f3714be0d9158af225.zip cpython-a28c291e92d30c64fdc034f3714be0d9158af225.tar.gz cpython-a28c291e92d30c64fdc034f3714be0d9158af225.tar.bz2 |
Add what looks like a necessary call to PyErr_NoMemory() when PyMem_MALLOC()
fails.
Diffstat (limited to 'Objects')
-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 7f56acf..5556c20 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); |