summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-12-09 14:11:39 (GMT)
committerGuido van Rossum <guido@python.org>1997-12-09 14:11:39 (GMT)
commit19b55f2d17d2a189f9b48844c06d501f25ca6dc5 (patch)
tree2163158d01c8d5f1a3f8d581b78b16491116c9da /Python
parenta2e268aa40c08b7d4c5200e66f7e96adf09d0f0c (diff)
downloadcpython-19b55f2d17d2a189f9b48844c06d501f25ca6dc5.zip
cpython-19b55f2d17d2a189f9b48844c06d501f25ca6dc5.tar.gz
cpython-19b55f2d17d2a189f9b48844c06d501f25ca6dc5.tar.bz2
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.
Diffstat (limited to 'Python')
-rw-r--r--Python/errors.c4
1 files changed, 2 insertions, 2 deletions
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 @@ PyErr_NormalizeException(exc, val, tb)
*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 */