mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
libdm: add missing error path check
Coverity: do not continue with section cloning when root node would a NULL.
This commit is contained in:
parent
18fd0bd20c
commit
b1c4017743
@ -563,7 +563,8 @@ static struct dm_config_node *_section(struct parser *p, struct dm_config_node *
|
||||
return NULL;
|
||||
}
|
||||
|
||||
root = _find_or_make_node(p->mem, parent, str);
|
||||
if (!(root = _find_or_make_node(p->mem, parent, str)))
|
||||
return_NULL;
|
||||
|
||||
if (p->t == TOK_SECTION_B) {
|
||||
match(TOK_SECTION_B);
|
||||
|
Loading…
Reference in New Issue
Block a user