Skip to content

Commit bceb197

Browse files
authored
gh-95369: add missing decref in error case of exception group's split (GH-95370)
1 parent b946f52 commit bceb197

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Objects/exceptions.c

+1
Original file line numberDiff line numberDiff line change
@@ -1106,6 +1106,7 @@ exceptiongroup_split_recursive(PyObject *exc,
11061106
assert(PyList_CheckExact(match_list));
11071107
if (PyList_Append(match_list, rec_result.match) < 0) {
11081108
Py_DECREF(rec_result.match);
1109+
Py_XDECREF(rec_result.rest);
11091110
goto done;
11101111
}
11111112
Py_DECREF(rec_result.match);

0 commit comments

Comments
 (0)