]> granicus.if.org Git - python/commitdiff
Backport 58330:
authorNeal Norwitz <nnorwitz@gmail.com>
Fri, 5 Oct 2007 03:45:42 +0000 (03:45 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Fri, 5 Oct 2007 03:45:42 +0000 (03:45 +0000)
Fix Coverity #158: Check the correct variable.

Python/ast.c

index c96c5035425a14ff18cc96bcd263ac5f882a33c8..2c03ad6acf58fd6e6ef790599b0045370254ec64 100644 (file)
@@ -1445,7 +1445,7 @@ ast_for_binop(struct compiling *c, const node *n)
                 tmp_result = BinOp(result, newoperator, tmp, 
                                   LINENO(next_oper), next_oper->n_col_offset,
                                    c->c_arena);
-               if (!tmp) 
+               if (!tmp_result
                        return NULL;
                result = tmp_result;
        }