From 0f415dc57fff6f15628d86150a1f18f083c27a07 Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Fri, 30 Jun 2006 07:32:46 +0000 Subject: Another problem reported by Coverity. Backport candidate. --- Objects/cellobject.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Objects/cellobject.c b/Objects/cellobject.c index da48dea..65a29aa 100644 --- a/Objects/cellobject.c +++ b/Objects/cellobject.c @@ -8,6 +8,8 @@ PyCell_New(PyObject *obj) PyCellObject *op; op = (PyCellObject *)PyObject_GC_New(PyCellObject, &PyCell_Type); + if (op == NULL) + return NULL; op->ob_ref = obj; Py_XINCREF(obj); -- cgit v0.12