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

This commit is contained in:
Alexey Izbyshev 2018-08-26 19:31:25 +03:00 committed by Xiang Zhang
parent b57b4ac042
commit a2eefa6754
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}