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

Skip to content

Commit 805ac28

Browse files
author
Alexey Izbyshev
committed
bpo-34503: Fix refleak in PyErr_SetObject()
1 parent 90555ec commit 805ac28

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
@@ -110,6 +110,7 @@ PyErr_SetObject(PyObject *exception, PyObject *value)
110110
fixed_value = _PyErr_CreateException(exception, value);
111111
Py_XDECREF(value);
112112
if (fixed_value == NULL) {
113+
Py_DECREF(exc_value);
113114
return;
114115
}
115116

0 commit comments

Comments
 (0)
0