gh-104413: Fix refleak when super attribute throws AttributeError (#104414)

This commit is contained in:
Jelle Zijlstra 2023-05-12 00:30:14 -07:00 committed by GitHub
parent a781484c8e
commit 718b132772
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 116 additions and 114 deletions

View file

@ -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)) {