summaryrefslogtreecommitdiffstats
path: root/Python/ast.c
diff options
context:
space:
mode:
authorHye-Shik Chang <hyeshik@gmail.com>2006-03-07 15:39:21 (GMT)
committerHye-Shik Chang <hyeshik@gmail.com>2006-03-07 15:39:21 (GMT)
commit4af5c8cee4885df70884a58e2e74c48984bbe7c2 (patch)
treef4c33e559962940576f84b61f760a1b27a3b8618 /Python/ast.c
parentef1701f7d3a57427c1289bef32227a7aaac7905a (diff)
downloadcpython-4af5c8cee4885df70884a58e2e74c48984bbe7c2.zip
cpython-4af5c8cee4885df70884a58e2e74c48984bbe7c2.tar.gz
cpython-4af5c8cee4885df70884a58e2e74c48984bbe7c2.tar.bz2
SF #1444030: Fix several potential defects found by Coverity.
(reviewed by Neal Norwitz)
Diffstat (limited to 'Python/ast.c')
-rw-r--r--Python/ast.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/ast.c b/Python/ast.c
index 5fbea39..bb1774b 100644
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -1438,6 +1438,8 @@ ast_for_trailer(struct compiling *c, const node *n, expr_ty left_expr)
}
/* extract Index values and put them in a Tuple */
elts = asdl_seq_new(asdl_seq_LEN(slices), c->c_arena);
+ if (!elts)
+ return NULL;
for (j = 0; j < asdl_seq_LEN(slices); ++j) {
slc = (slice_ty)asdl_seq_GET(slices, j);
assert(slc->kind == Index_kind && slc->v.Index.value);