1
0
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:
Zdenek Kabelac 2015-11-09 09:31:59 +01:00
parent 18fd0bd20c
commit b1c4017743

View File

@ -563,7 +563,8 @@ static struct dm_config_node *_section(struct parser *p, struct dm_config_node *
return NULL; 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) { if (p->t == TOK_SECTION_B) {
match(TOK_SECTION_B); match(TOK_SECTION_B);