closes bpo-36115: Fix some reference leaks in typeobject.c. (GH-12045)
a24107b04c1277e3c1105f98aff5bfa3a98b33a0 introduced a few refleaks. https://bugs.python.org/issue36115
This commit is contained in:
parent
f57cd8288d
commit
d5a551c269
@ -4962,6 +4962,7 @@ add_getset(PyTypeObject *type, PyGetSetDef *gsp)
|
|||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (PyDict_GetItemWithError(dict, PyDescr_NAME(descr))) {
|
if (PyDict_GetItemWithError(dict, PyDescr_NAME(descr))) {
|
||||||
|
Py_DECREF(descr);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (PyErr_Occurred()) {
|
else if (PyErr_Occurred()) {
|
||||||
@ -7689,6 +7690,7 @@ super_getattro(PyObject *self, PyObject *name)
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
else if (PyErr_Occurred()) {
|
else if (PyErr_Occurred()) {
|
||||||
|
Py_DECREF(mro);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user