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:
Miss Islington (bot) 2022-07-28 04:28:46 -07:00 committed by GitHub
parent 763801aae2
commit 6934726d22
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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