diff Python/symtable.c @ 35939:79374eb6db51 legacy-trunk

Fix a few more ref leaks. Backport candidate
author Neal Norwitz <nnorwitz@gmail.com>
date Thu, 24 Nov 2005 22:09:18 +0000
parents 825655bfdf20
children 4aa01879a8f5
line wrap: on
line diff
--- a/Python/symtable.c	Thu Nov 24 22:00:56 2005 +0000
+++ b/Python/symtable.c	Thu Nov 24 22:09:18 2005 +0000
@@ -1278,8 +1278,10 @@
 	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);