diff options
| author | Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> | 2022-11-08 12:20:07 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-08 15:50:07 +0900 |
| commit | a751bf565c731c87f2e02678ee080f04c86d7eee (patch) | |
| tree | 55104c6f9c828248dd628797adfc72e5c9c791bc | |
| parent | b9dedfe61dce2997e3e6be318d8c50b0c19c9394 (diff) | |
| download | cpython-git-a751bf565c731c87f2e02678ee080f04c86d7eee.tar.gz | |
GH-90699: fix refleak in `_testcapimodule.c` (gh-99236)
| -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 0e09c97bea..1624a93ec3 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) |
