summaryrefslogtreecommitdiff
path: root/Python/bytecodes.c
diff options
context:
space:
mode:
authorDennis Sweeney <36520290+sweeneyde@users.noreply.github.com>2023-02-27 05:46:40 -0500
committerGitHub <noreply@github.com>2023-02-27 10:46:40 +0000
commite3c3f9fec099fe78d2f98912be337d632f6fcdd1 (patch)
treed38597eae9ef4018b063e217f3c30147c09167fb /Python/bytecodes.c
parent101a12c5767a8c6ca6e32b8e24a462d2606d24ca (diff)
downloadcpython-git-e3c3f9fec099fe78d2f98912be337d632f6fcdd1.tar.gz
gh-102250: Fix double-decref in COMPARE_AND_BRANCH error case (GH-102287)
Diffstat (limited to 'Python/bytecodes.c')
-rw-r--r--Python/bytecodes.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/Python/bytecodes.c b/Python/bytecodes.c
index ad68c794fe..7e9b36f697 100644
--- a/Python/bytecodes.c
+++ b/Python/bytecodes.c
@@ -1754,9 +1754,7 @@ dummy_func(
int offset = next_instr[1].op.arg;
int err = PyObject_IsTrue(cond);
Py_DECREF(cond);
- if (err < 0) {
- goto error;
- }
+ ERROR_IF(err < 0, error);
if (jump_on_true == (err != 0)) {
JUMPBY(offset);
}