From 19b55f2d17d2a189f9b48844c06d501f25ca6dc5 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Tue, 9 Dec 1997 14:11:39 +0000 Subject: 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. --- Python/errors.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Python/errors.c') diff --git a/Python/errors.c b/Python/errors.c index 2a45f0390a..1a643c0fac 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 */ -- cgit v1.2.1