Commit a2eefa67 authored by Alexey Izbyshev's avatar Alexey Izbyshev Committed by Xiang Zhang

bpo-34503: Fix refleak in PyErr_SetObject() (GH-8934)

parent b57b4ac0
......@@ -110,6 +110,7 @@ PyErr_SetObject(PyObject *exception, PyObject *value)
fixed_value = _PyErr_CreateException(exception, value);
Py_XDECREF(value);
if (fixed_value == NULL) {
Py_DECREF(exc_value);
return;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment