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. */
|
/* Execute __del__ method, if any. */
|
||||||
del = _PyType_Lookup(Py_TYPE(self), tp_del);
|
del = _PyType_Lookup(Py_TYPE(self), tp_del);
|
||||||
|
Py_DECREF(tp_del);
|
||||||
if (del != NULL) {
|
if (del != NULL) {
|
||||||
res = PyObject_CallOneArg(del, self);
|
res = PyObject_CallOneArg(del, self);
|
||||||
if (res == NULL)
|
if (res == NULL)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user