Fix subtle bug in cleanup code in PyErr_NormalizeException(), detected
by Marc Lemburg. There's a path through the code where *val is NULL,
but value isn't, and value should be DECREF'ed.
diff --git a/Python/errors.c b/Python/errors.c
index 2a45f03..1a643c0 100644
--- a/Python/errors.c
+++ b/Python/errors.c
@@ -219,8 +219,8 @@
*val = value;
return;
finally:
- Py_DECREF(*exc);
- Py_DECREF(*val);
+ Py_DECREF(type);
+ Py_DECREF(value);
Py_XDECREF(*tb);
PyErr_Fetch(exc, val, tb);
/* normalize recursively */