From: Neal Norwitz Date: Fri, 30 Jun 2006 07:32:46 +0000 (+0000) Subject: Another problem reported by Coverity. Backport candidate. X-Git-Tag: v2.5b2~85 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0f415dc57fff6f15628d86150a1f18f083c27a07;p=thirdparty%2FPython%2Fcpython.git Another problem reported by Coverity. Backport candidate. --- diff --git a/Objects/cellobject.c b/Objects/cellobject.c index da48dea74522..65a29aaca836 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);