mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Check return value of asdl_seq_new(). Found by Coverity.
This commit is contained in:
parent
8bd24fe9ff
commit
28a2ad556a
1 changed files with 2 additions and 0 deletions
|
@ -3502,6 +3502,8 @@ ast_for_with_stmt(struct compiling *c, const node *n)
|
|||
|
||||
n_items = (NCH(n) - 2) / 2;
|
||||
items = asdl_seq_new(n_items, c->c_arena);
|
||||
if (!items)
|
||||
return NULL;
|
||||
for (i = 1; i < NCH(n) - 2; i += 2) {
|
||||
withitem_ty item = ast_for_with_item(c, CHILD(n, i));
|
||||
if (!item)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue