GH-90699: fix refleak in `_testcapimodule.c` (gh-99236)

This commit is contained in:
Kumar Aditya 2022-11-08 12:20:07 +05:30 committed by GitHub
parent b9dedfe61d
commit a751bf565c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -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)