Skip to content

Commit

Permalink
gh-104413: Fix refleak when super attribute throws AttributeError (#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
JelleZijlstra committed May 12, 2023
1 parent a781484 commit 718b132
Show file tree
Hide file tree
Showing 2 changed files with 116 additions and 114 deletions.
2 changes: 1 addition & 1 deletion Python/bytecodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -1598,8 +1598,8 @@ dummy_func(
STAT_INC(LOAD_SUPER_ATTR, hit);
PyObject *name = GETITEM(frame->f_code->co_names, oparg >> 2);
res = _PySuper_Lookup((PyTypeObject *)class, self, name, NULL);
ERROR_IF(res == NULL, error);
DECREF_INPUTS();
ERROR_IF(res == NULL, error);
}

inst(LOAD_SUPER_ATTR_METHOD, (unused/1, global_super, class, self -- res2, res)) {
Expand Down

0 comments on commit 718b132

Please sign in to comment.