8000 bpo-34503: Fix refleak in PyErr_SetObject() (GH-8934) · python/cpython@204fb45 · GitHub
[go: up one dir, main page]

Skip to content

Commit 204fb45

Browse files
miss-islingtonAlexey Izbyshev
andauthored
bpo-34503: Fix refleak in PyErr_SetObject() (GH-8934)
(cherry picked from commit a2eefa6) Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
1 parent d60bdf2 commit 204fb45

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Python/errors.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ PyErr_SetObject(PyObject *exception, PyObject *value)
9797
fixed_value = _PyErr_CreateException(exception, value);
9898
Py_XDECREF(value);
9999
if (fixed_value == NULL) {
100+
Py_DECREF(exc_value);
100101
return;
101102
}
102103

0 commit comments

Comments
 (0)
0