summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>2022-07-28 10:38:46 (GMT)
committerGitHub <noreply@github.com>2022-07-28 10:38:46 (GMT)
commitbceb197947bbaebb11e01195bdce4f240fdf9332 (patch)
tree214610c573dd175eb22fd521e27dd5706c7b8e17 /Objects
parentb946f529efb4a623ac4ad968d8091edb81ebdcdb (diff)
downloadcpython-bceb197947bbaebb11e01195bdce4f240fdf9332.zip
cpython-bceb197947bbaebb11e01195bdce4f240fdf9332.tar.gz
cpython-bceb197947bbaebb11e01195bdce4f240fdf9332.tar.bz2
gh-95369: add missing decref in error case of exception group's split (GH-95370)
Diffstat (limited to 'Objects')
-rw-r--r--Objects/exceptions.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Objects/exceptions.c b/Objects/exceptions.c
index 745b890..c568868 100644
--- a/Objects/exceptions.c
+++ b/Objects/exceptions.c
@@ -1106,6 +1106,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);