[3.14] gh-145376: Fix various reference leaks (GH-145377) (GH-145712)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
Stan Ulbrych 2026-03-10 15:31:02 +00:00 committed by GitHub
parent 05b074cf81
commit 6d9221c7d1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 5 additions and 1 deletions

View file

@ -1151,6 +1151,7 @@ _PyErr_Display(PyObject *file, PyObject *unused, PyObject *value, PyObject *tb)
"traceback",
"_print_exception_bltin");
if (print_exception_fn == NULL || !PyCallable_Check(print_exception_fn)) {
Py_XDECREF(print_exception_fn);
goto fallback;
}