From a28c291e92d30c64fdc034f3714be0d9158af225 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Tue, 15 May 2007 20:39:12 +0000 Subject: [PATCH] Add what looks like a necessary call to PyErr_NoMemory() when PyMem_MALLOC() fails. --- Objects/intobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Objects/intobject.c b/Objects/intobject.c index 7f56acff5d2..5556c206fec 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);