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

Lines changed: 1 addition & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy