Skip to content

Commit

Permalink
pythongh-103879: Fix refleak in super specialization
Browse files Browse the repository at this point in the history
  • Loading branch information
JelleZijlstra committed Apr 26, 2023
1 parent 1c0a9c5 commit fb53869
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Python/specialize.c
Original file line number Diff line number Diff line change
Expand Up @@ -544,8 +544,10 @@ _Py_Specialize_LoadSuperAttr(PyObject *global_super, PyObject *class, PyObject *
write_u32(cache->self_type_version, Py_TYPE(self)->tp_version_tag);
write_obj(cache->method, res); // borrowed
instr->op.code = LOAD_SUPER_ATTR_METHOD;
Py_DECREF(res);
goto success;
}
Py_DECREF(res);
SPECIALIZATION_FAIL(LOAD_SUPER_ATTR, SPEC_FAIL_SUPER_NOT_METHOD);

fail:
Expand Down

0 comments on commit fb53869

Please sign in to comment.