diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2007-05-16 04:35:11 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2007-05-16 04:35:11 (GMT) |
commit | 5ece2fb0d1fe921a741dc06c94e976490cf1a7fb (patch) | |
tree | 0fd84438685bdff37542fc9401369c5d7bb6c45c /Objects | |
parent | 4c87581c328c0f0fc9cc477c62f5f1a37799ba8c (diff) | |
download | cpython-5ece2fb0d1fe921a741dc06c94e976490cf1a7fb.zip cpython-5ece2fb0d1fe921a741dc06c94e976490cf1a7fb.tar.gz cpython-5ece2fb0d1fe921a741dc06c94e976490cf1a7fb.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 8aa8d0b..2f5c124 100644 --- a/Objects/intobject.c +++ b/Objects/intobject.c @@ -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); |