Issue 22906: Increment refcount after PyException_SetContext

This commit is contained in:
Yury Selivanov 2015-05-09 14:04:17 -04:00
parent e9ad5a57d7
commit 80e4dbea0e
1 changed files with 1 additions and 0 deletions

View File

@ -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);
}
}