mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
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.
This commit is contained in:
parent
a2e268aa40
commit
19b55f2d17
1 changed files with 2 additions and 2 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue