Skip to content

Commit 718b132

Browse files
gh-104413: Fix refleak when super attribute throws AttributeError (#104414)
1 parent a781484 commit 718b132

File tree

2 files changed

+116
-114
lines changed

2 files changed

+116
-114
lines changed

Python/bytecodes.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1598,8 +1598,8 @@ dummy_func(
15981598
STAT_INC(LOAD_SUPER_ATTR, hit);
15991599
PyObject *name = GETITEM(frame->f_code->co_names, oparg >> 2);
16001600
res = _PySuper_Lookup((PyTypeObject *)class, self, name, NULL);
1601-
ERROR_IF(res == NULL, error);
16021601
DECREF_INPUTS();
1602+
ERROR_IF(res == NULL, error);
16031603
}
16041604

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

0 commit comments

Comments
 (0)