diff options
author | Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> | 2022-11-08 06:50:07 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-08 06:50:07 (GMT) |
commit | a751bf565c731c87f2e02678ee080f04c86d7eee (patch) | |
tree | 55104c6f9c828248dd628797adfc72e5c9c791bc /Modules/_testcapimodule.c | |
parent | b9dedfe61dce2997e3e6be318d8c50b0c19c9394 (diff) | |
download | cpython-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.c | 1 |
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) |