don't leak if the __class__ closure is set
This commit is contained in:
parent
ae1b94b6e4
commit
8e8fbeae27
|
@ -158,10 +158,8 @@ builtin___build_class__(PyObject *self, PyObject *args, PyObject *kwds)
|
|||
cls = PyEval_CallObjectWithKeywords(meta, margs, mkw);
|
||||
Py_DECREF(margs);
|
||||
}
|
||||
if (cls != NULL && PyCell_Check(cell)) {
|
||||
Py_INCREF(cls);
|
||||
PyCell_SET(cell, cls);
|
||||
}
|
||||
if (cls != NULL && PyCell_Check(cell))
|
||||
PyCell_Set(cell, cls);
|
||||
Py_DECREF(cell);
|
||||
}
|
||||
Py_DECREF(ns);
|
||||
|
|
Loading…
Reference in New Issue