mirror of https://github.com/python/cpython
GH-90699: fix refleak in `_testcapimodule.c` (gh-99236)
This commit is contained in:
parent
b9dedfe61d
commit
a751bf565c
|
@ -3375,6 +3375,7 @@ slot_tp_del(PyObject *self)
|
|||
}
|
||||
/* Execute __del__ method, if any. */
|
||||
del = _PyType_Lookup(Py_TYPE(self), tp_del);
|
||||
Py_DECREF(tp_del);
|
||||
if (del != NULL) {
|
||||
res = PyObject_CallOneArg(del, self);
|
||||
if (res == NULL)
|
||||
|
|
Loading…
Reference in New Issue