summaryrefslogtreecommitdiffstats
path: root/Python/bytecodes.c
diff options
context:
space:
mode:
authorPetr Viktorin <encukou@gmail.com>2025-02-28 08:58:50 (GMT)
committerGitHub <noreply@github.com>2025-02-28 08:58:50 (GMT)
commitfecf8bc8f2fd09a9a4c5177d32dbb42920b4e177 (patch)
treecd0517a315ba229ca2f954f0def26ef2836e43a0 /Python/bytecodes.c
parent24c52cb14c4b044154bd46bd1b2a9c37076caeb9 (diff)
downloadcpython-fecf8bc8f2fd09a9a4c5177d32dbb42920b4e177.zip
cpython-fecf8bc8f2fd09a9a4c5177d32dbb42920b4e177.tar.gz
cpython-fecf8bc8f2fd09a9a4c5177d32dbb42920b4e177.tar.bz2
gh-130595: Fix leak in WITH_EXCEPT_START error case (GH-130626)
Co-authored-by: Ken Jin <kenjin@python.org>
Diffstat (limited to 'Python/bytecodes.c')
-rw-r--r--Python/bytecodes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/bytecodes.c b/Python/bytecodes.c
index dc709a7..1b9b651 100644
--- a/Python/bytecodes.c
+++ b/Python/bytecodes.c
@@ -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);
}