mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
gh-95369: add missing decref in error case of exception group's split (GH-95370)
(cherry picked from commit bceb197947
)
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
This commit is contained in:
parent
763801aae2
commit
6934726d22
1 changed files with 1 additions and 0 deletions
|
@ -1114,6 +1114,7 @@ exceptiongroup_split_recursive(PyObject *exc,
|
|||
assert(PyList_CheckExact(match_list));
|
||||
if (PyList_Append(match_list, rec_result.match) < 0) {
|
||||
Py_DECREF(rec_result.match);
|
||||
Py_XDECREF(rec_result.rest);
|
||||
goto done;
|
||||
}
|
||||
Py_DECREF(rec_result.match);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue