summaryrefslogtreecommitdiffstats
path: root/Objects/genobject.c
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2015-05-09 18:04:17 (GMT)
committerYury Selivanov <yselivanov@sprymix.com>2015-05-09 18:04:17 (GMT)
commit80e4dbea0ebbc7fa6a25c83c854414bac11d6a15 (patch)
treeab0a76ae81a76c21a67b75785319641b155c50df /Objects/genobject.c
parente9ad5a57d793562ffb4ab37cf420aee5aeb3afbc (diff)
downloadcpython-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.c1
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);
}
}