Skip to content

Commit fecf8bc

Browse files
pythongh-130595: Fix leak in WITH_EXCEPT_START error case (pythonGH-130626)
Co-authored-by: Ken Jin <kenjin@python.org>
1 parent 24c52cb commit fecf8bc

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

Python/bytecodes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3317,8 +3317,8 @@ dummy_func(
33173317
int has_self = !PyStackRef_IsNull(exit_self);
33183318
PyObject *res_o = PyObject_Vectorcall(exit_func_o, stack + 2 - has_self,
33193319
(3 + has_self) | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
3320-
ERROR_IF(res_o == NULL, error);
33213320
Py_XDECREF(original_tb);
3321+
ERROR_IF(res_o == NULL, error);
33223322
res = PyStackRef_FromPyObjectSteal(res_o);
33233323
}
33243324

Python/executor_cases.c.h

Lines changed: 1 addition & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Python/generated_cases.c.h

Lines changed: 1 addition & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)