mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +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;
|
||||
|
||||
op = (PyCellObject *)PyObject_GC_New(PyCellObject, &PyCell_Type);
|
||||
if (op == NULL)
|
||||
return NULL;
|
||||
op->ob_ref = obj;
|
||||
Py_XINCREF(obj);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue