mirror of
https://github.com/python/cpython.git
synced 2025-08-01 23:53:15 +00:00
Issue 22906: Increment refcount after PyException_SetContext
This commit is contained in:
parent
e9ad5a57d7
commit
80e4dbea0e
1 changed files with 1 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue