diff options
author | Yury Selivanov <yselivanov@sprymix.com> | 2015-05-09 18:04:17 (GMT) |
---|---|---|
committer | Yury Selivanov <yselivanov@sprymix.com> | 2015-05-09 18:04:17 (GMT) |
commit | 80e4dbea0ebbc7fa6a25c83c854414bac11d6a15 (patch) | |
tree | ab0a76ae81a76c21a67b75785319641b155c50df /Objects/genobject.c | |
parent | e9ad5a57d793562ffb4ab37cf420aee5aeb3afbc (diff) | |
download | cpython-80e4dbea0ebbc7fa6a25c83c854414bac11d6a15.zip cpython-80e4dbea0ebbc7fa6a25c83c854414bac11d6a15.tar.gz cpython-80e4dbea0ebbc7fa6a25c83c854414bac11d6a15.tar.bz2 |
Issue 22906: Increment refcount after PyException_SetContext
Diffstat (limited to 'Objects/genobject.c')
-rw-r--r-- | Objects/genobject.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Objects/genobject.c b/Objects/genobject.c index 5ae8512..149e545 100644 --- a/Objects/genobject.c +++ b/Objects/genobject.c @@ -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); } } |