[pypy-commit] cffi default: One more corner case

arigo noreply at buildbot.pypy.org
Tue Nov 24 11:39:32 EST 2015


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r2432:cfc510bd81d7
Date: 2015-11-24 17:40 +0100
http://bitbucket.org/cffi/cffi/changeset/cfc510bd81d7/

Log:	One more corner case

diff --git a/c/_cffi_backend.c b/c/_cffi_backend.c
--- a/c/_cffi_backend.c
+++ b/c/_cffi_backend.c
@@ -5778,6 +5778,10 @@
     }
 
     view = PyObject_Malloc(sizeof(Py_buffer));
+    if (view == NULL) {
+        PyErr_NoMemory();
+        return NULL;
+    }
     if (_my_PyObject_GetContiguousBuffer(x, view, 0) < 0)
         goto error1;
 


More information about the pypy-commit mailing list