Commit b0b472fb authored by Stefan Krah's avatar Stefan Krah

Check return value of asdl_seq_new(). Found by Coverity.

parent 66c8fcfb
...@@ -3502,6 +3502,8 @@ ast_for_with_stmt(struct compiling *c, const node *n) ...@@ -3502,6 +3502,8 @@ ast_for_with_stmt(struct compiling *c, const node *n)
n_items = (NCH(n) - 2) / 2; n_items = (NCH(n) - 2) / 2;
items = asdl_seq_new(n_items, c->c_arena); items = asdl_seq_new(n_items, c->c_arena);
if (!items)
return NULL;
for (i = 1; i < NCH(n) - 2; i += 2) { for (i = 1; i < NCH(n) - 2; i += 2) {
withitem_ty item = ast_for_with_item(c, CHILD(n, i)); withitem_ty item = ast_for_with_item(c, CHILD(n, i));
if (!item) if (!item)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment