diff options
Diffstat (limited to 'Python')
-rw-r--r-- | Python/ceval.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index 82cc9a2..3e74819 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -4266,6 +4266,9 @@ do_raise(PyObject *exc, PyObject *cause) goto raise_error; } + assert(type != NULL); + assert(value != NULL); + if (cause) { PyObject *fixed_cause; if (PyExceptionClass_Check(cause)) { @@ -4292,8 +4295,8 @@ do_raise(PyObject *exc, PyObject *cause) PyErr_SetObject(type, value); /* PyErr_SetObject incref's its arguments */ - Py_XDECREF(value); - Py_XDECREF(type); + Py_DECREF(value); + Py_DECREF(type); return 0; raise_error: |