Commit 80e4dbea authored by Yury Selivanov's avatar Yury Selivanov

Issue 22906: Increment refcount after PyException_SetContext

parent e9ad5a57
......@@ -151,6 +151,7 @@ gen_send_ex(PyGenObject *gen, PyObject *arg, int exc)
PyErr_NormalizeException(&exc, &val2, &tb);
PyException_SetCause(val2, val);
PyException_SetContext(val2, val);
Py_INCREF(val);
PyErr_Restore(exc, val2, tb);
}
}
......
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