diff Python/ast.c @ 39445:e11caad7e029 legacy-trunk

Klocwork made another run and found a bunch more problems. This is the first batch of fixes that should be easy to verify based on context. This fixes problem numbers: 220 (ast), 323-324 (symtable), 321-322 (structseq), 215 (array), 210 (hotshot), 182 (codecs), 209 (etree).
author Neal Norwitz <nnorwitz@gmail.com>
date Sat, 12 Aug 2006 01:43:40 +0000
parents d0e6170704de
children 8dcb882ec3e1
line wrap: on
line diff
--- a/Python/ast.c	Fri Aug 11 19:55:35 2006 +0000
+++ b/Python/ast.c	Sat Aug 12 01:43:40 2006 +0000
@@ -2197,6 +2197,8 @@
             }
             else {
                 alias_ty a = alias_for_import_name(c, CHILD(n, 0));
+                if (!a)
+                    return NULL;
                 if (strcmp(STR(CHILD(n, 1)), "as") != 0) {
                     ast_error(n, "must use 'as' in import");
                     return NULL;