mirror of
https://github.com/python/cpython.git
synced 2025-11-11 22:55:08 +00:00
Another problem reported by Coverity. Backport candidate.
This commit is contained in:
parent
3f2748e775
commit
0f415dc57f
1 changed files with 2 additions and 0 deletions
|
|
@ -8,6 +8,8 @@ PyCell_New(PyObject *obj)
|
||||||
PyCellObject *op;
|
PyCellObject *op;
|
||||||
|
|
||||||
op = (PyCellObject *)PyObject_GC_New(PyCellObject, &PyCell_Type);
|
op = (PyCellObject *)PyObject_GC_New(PyCellObject, &PyCell_Type);
|
||||||
|
if (op == NULL)
|
||||||
|
return NULL;
|
||||||
op->ob_ref = obj;
|
op->ob_ref = obj;
|
||||||
Py_XINCREF(obj);
|
Py_XINCREF(obj);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue