]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
GH-90699: fix refleak in `_testcapimodule.c` (gh-99236)
authorKumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Tue, 8 Nov 2022 06:50:07 +0000 (12:20 +0530)
committerGitHub <noreply@github.com>
Tue, 8 Nov 2022 06:50:07 +0000 (15:50 +0900)
Modules/_testcapimodule.c

index 0e09c97bea09a58f3e5a61b1445bdd658d34c5c7..1624a93ec3f3e3d4f8662b584bacb9297fcbf009 100644 (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)