From d501d1fbc480350daa251905a22c6ab79f1a82c8 Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Wed, 16 May 2007 04:33:50 +0000 Subject: Port rev 55353 from Guido: Add what looks like a necessary call to PyErr_NoMemory() when PyMem_MALLOC() fails. Will backport. --- Objects/intobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit v0.12