Skip to content

Commit

Permalink
Fix subtle bug in cleanup code in PyErr_NormalizeException(), detected
Browse files Browse the repository at this point in the history
by Marc Lemburg.  There's a path through the code where *val is NULL,
but value isn't, and value should be DECREF'ed.
  • Loading branch information
gvanrossum committed Dec 9, 1997
1 parent a2e268a commit 19b55f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Python/errors.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 19b55f2

Please sign in to comment.