mirror of
https://git.musl-libc.org/git/musl
synced 2025-01-09 00:02:17 +03:00
regcomp: propagate allocation failures
The error code of an allocating function was not checked in tre_add_tag.
This commit is contained in:
parent
b61df2294f
commit
4260dfe1ec
@ -1584,7 +1584,8 @@ tre_add_tags(tre_mem_t mem, tre_stack_t *stack, tre_ast_node_t *tree,
|
||||
{
|
||||
status = tre_add_tag_right(mem, left, tag_left);
|
||||
tnfa->tag_directions[tag_left] = TRE_TAG_MAXIMIZE;
|
||||
status = tre_add_tag_right(mem, right, tag_right);
|
||||
if (status == REG_OK)
|
||||
status = tre_add_tag_right(mem, right, tag_right);
|
||||
tnfa->tag_directions[tag_right] = TRE_TAG_MAXIMIZE;
|
||||
}
|
||||
num_tags += 2;
|
||||
|
Loading…
Reference in New Issue
Block a user