mirror of
https://github.com/python/cpython.git
synced 2026-01-08 08:22:41 +00:00
SF #1444030: Fix several potential defects found by Coverity.
(reviewed by Neal Norwitz)
This commit is contained in:
parent
ef1701f7d3
commit
4af5c8cee4
11 changed files with 53 additions and 17 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue