gh-102250: Fix double-decref in COMPARE_AND_BRANCH error case (GH-102287)

This commit is contained in:
Dennis Sweeney 2023-02-27 05:46:40 -05:00 committed by GitHub
parent 101a12c576
commit e3c3f9fec0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 23 additions and 6 deletions

View file

@ -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);
}