From 5ece2fb0d1fe921a741dc06c94e976490cf1a7fb Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Wed, 16 May 2007 04:35:11 +0000 Subject: 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 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); -- cgit v0.12