gh-132781: fix refleaks in crossinterp_exceptions.h post gh-132782 (#132989)

This commit is contained in:
Bénédikt Tran 2025-04-26 12:14:14 +02:00 committed by GitHub
parent 8a4d4f37ab
commit ca12a744ab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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);
}
}