mirror of
https://github.com/python/cpython.git
synced 2024-12-15 04:44:47 +08:00
Issue 22906: Increment refcount after PyException_SetContext
This commit is contained in:
parent
e9ad5a57d7
commit
80e4dbea0e
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user