mirror of
https://github.com/python/cpython.git
synced 2025-07-23 11:15:24 +00:00
closes bpo-36115: Fix some reference leaks in typeobject.c. (GH-12045)
a24107b04c
introduced a few refleaks.
https://bugs.python.org/issue36115
This commit is contained in:
parent
f57cd8288d
commit
d5a551c269
1 changed files with 2 additions and 0 deletions
|
@ -4962,6 +4962,7 @@ add_getset(PyTypeObject *type, PyGetSetDef *gsp)
|
|||
return -1;
|
||||
|
||||
if (PyDict_GetItemWithError(dict, PyDescr_NAME(descr))) {
|
||||
Py_DECREF(descr);
|
||||
continue;
|
||||
}
|
||||
else if (PyErr_Occurred()) {
|
||||
|
@ -7689,6 +7690,7 @@ super_getattro(PyObject *self, PyObject *name)
|
|||
return res;
|
||||
}
|
||||
else if (PyErr_Occurred()) {
|
||||
Py_DECREF(mro);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue