Skip to content

Commit 6934726

Browse files
gh-95369: add missing decref in error case of exception group's split (GH-95370)
(cherry picked from commit bceb197) Co-authored-by: Irit Katriel <[email protected]>
1 parent 763801a commit 6934726

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Objects/exceptions.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,6 +1114,7 @@ exceptiongroup_split_recursive(PyObject *exc,
11141114
assert(PyList_CheckExact(match_list));
11151115
if (PyList_Append(match_list, rec_result.match) < 0) {
11161116
Py_DECREF(rec_result.match);
1117+
Py_XDECREF(rec_result.rest);
11171118
goto done;
11181119
}
11191120
Py_DECREF(rec_result.match);

0 commit comments

Comments
 (0)