From 4313c8454f4771a45ed45d7506a998f8a8fb38b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A9n=C3=A9dikt=20Tran?= <10796600+picnixz@users.noreply.github.com> Date: Sat, 26 Apr 2025 11:27:37 +0200 Subject: [PATCH] fix refleaks in `crossinterp_exceptions.h` --- Python/crossinterp_exceptions.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Python/crossinterp_exceptions.h b/Python/crossinterp_exceptions.h index 857c4d1e379a0e..ca4ca1cf123e49 100644 --- a/Python/crossinterp_exceptions.h +++ b/Python/crossinterp_exceptions.h @@ -110,6 +110,7 @@ set_notshareableerror(PyThreadState *tstate, PyObject *cause, int force, const c } else { _ensure_notshareableerror(tstate, cause, force, msgobj); + Py_DECREF(msgobj); } } @@ -123,6 +124,7 @@ format_notshareableerror_v(PyThreadState *tstate, PyObject *cause, int force, } else { _ensure_notshareableerror(tstate, cause, force, msgobj); + Py_DECREF(msgobj); } }