mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Fix a few more ref leaks. Backport candidate
This commit is contained in:
parent
430f68b447
commit
3715c3e576
3 changed files with 8 additions and 4 deletions
|
@ -1278,8 +1278,10 @@ symtable_visit_alias(struct symtable *st, alias_ty a)
|
|||
else {
|
||||
if (st->st_cur->ste_type != ModuleBlock) {
|
||||
if (!symtable_warn(st,
|
||||
"import * only allowed at module level"))
|
||||
"import * only allowed at module level")) {
|
||||
Py_DECREF(store_name);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
st->st_cur->ste_unoptimized |= OPT_IMPORT_STAR;
|
||||
Py_DECREF(store_name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue