summaryrefslogtreecommitdiffstats
path: root/Python/symtable.c
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2005-11-24 22:09:18 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2005-11-24 22:09:18 (GMT)
commit3715c3e576a182692cf2ad2d390732126f11780d (patch)
tree3697c936d8d681dc025408bcc9db20824a3f2db6 /Python/symtable.c
parent430f68b447f61aab20b7db58705f6b16b10d5149 (diff)
downloadcpython-3715c3e576a182692cf2ad2d390732126f11780d.zip
cpython-3715c3e576a182692cf2ad2d390732126f11780d.tar.gz
cpython-3715c3e576a182692cf2ad2d390732126f11780d.tar.bz2
Fix a few more ref leaks. Backport candidate
Diffstat (limited to 'Python/symtable.c')
-rw-r--r--Python/symtable.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Python/symtable.c b/Python/symtable.c
index 9eff334..016251c 100644
--- a/Python/symtable.c
+++ b/Python/symtable.c
@@ -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);