diff options
Diffstat (limited to 'Python')
-rw-r--r-- | Python/crossinterp_exceptions.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/crossinterp_exceptions.h b/Python/crossinterp_exceptions.h index 857c4d1e379..ca4ca1cf123 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); } } |