mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-130595: Fix leak in WITH_EXCEPT_START error case (GH-130626)
Co-authored-by: Ken Jin <kenjin@python.org>
This commit is contained in:
parent
24c52cb14c
commit
fecf8bc8f2
3 changed files with 3 additions and 7 deletions
|
@ -3317,8 +3317,8 @@ dummy_func(
|
|||
int has_self = !PyStackRef_IsNull(exit_self);
|
||||
PyObject *res_o = PyObject_Vectorcall(exit_func_o, stack + 2 - has_self,
|
||||
(3 + has_self) | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
|
||||
ERROR_IF(res_o == NULL, error);
|
||||
Py_XDECREF(original_tb);
|
||||
ERROR_IF(res_o == NULL, error);
|
||||
res = PyStackRef_FromPyObjectSteal(res_o);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue