summaryrefslogtreecommitdiff
path: root/Objects
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2006-10-03 12:58:52 +0000
committerAndrew M. Kuchling <amk@amk.ca>2006-10-03 12:58:52 +0000
commitceb4914f42c74de856d8b6199e85d4b2e643ee05 (patch)
tree5ed6526019c2ed4177cb623a03155bcd8cf156d4 /Objects
parented0681ffab2de3067b73400810d91bf2a7b53562 (diff)
downloadcpython-git-ceb4914f42c74de856d8b6199e85d4b2e643ee05.tar.gz
[Backport rev. 47171 by neal.norwitz]
Another problem reported by Coverity. Backport candidate.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/cellobject.c2
1 files changed, 2 insertions, 0 deletions
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);