From ceb4914f42c74de856d8b6199e85d4b2e643ee05 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Tue, 3 Oct 2006 12:58:52 +0000 Subject: [Backport rev. 47171 by neal.norwitz] Another problem reported by Coverity. Backport candidate. --- Objects/cellobject.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Objects') diff --git a/Objects/cellobject.c b/Objects/cellobject.c index 3b870934dc..6b31b982ed 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 v1.2.1