summaryrefslogtreecommitdiffstats
path: root/Modules/_testcapimodule.c
diff options
context:
space:
mode:
authorKumar Aditya <59607654+kumaraditya303@users.noreply.github.com>2022-11-08 06:50:07 (GMT)
committerGitHub <noreply@github.com>2022-11-08 06:50:07 (GMT)
commita751bf565c731c87f2e02678ee080f04c86d7eee (patch)
tree55104c6f9c828248dd628797adfc72e5c9c791bc /Modules/_testcapimodule.c
parentb9dedfe61dce2997e3e6be318d8c50b0c19c9394 (diff)
downloadcpython-a751bf565c731c87f2e02678ee080f04c86d7eee.zip
cpython-a751bf565c731c87f2e02678ee080f04c86d7eee.tar.gz
cpython-a751bf565c731c87f2e02678ee080f04c86d7eee.tar.bz2
GH-90699: fix refleak in `_testcapimodule.c` (gh-99236)
Diffstat (limited to 'Modules/_testcapimodule.c')
-rw-r--r--Modules/_testcapimodule.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c
index 0e09c97..1624a93 100644
--- a/Modules/_testcapimodule.c
+++ b/Modules/_testcapimodule.c
@@ -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)