summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-06-30 07:32:46 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2006-06-30 07:32:46 (GMT)
commit0f415dc57fff6f15628d86150a1f18f083c27a07 (patch)
tree65c6541baa36d8915755e735d3d46037fbc750e1 /Objects
parent3f2748e775ccbb36aa7fbdf7ed808c5377849339 (diff)
downloadcpython-0f415dc57fff6f15628d86150a1f18f083c27a07.zip
cpython-0f415dc57fff6f15628d86150a1f18f083c27a07.tar.gz
cpython-0f415dc57fff6f15628d86150a1f18f083c27a07.tar.bz2
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 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);