mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
dumpconfig: check conf tree was created
Missing error path.
This commit is contained in:
parent
baada4316d
commit
c394c2a624
@ -196,8 +196,11 @@ int dumpconfig(struct cmd_context *cmd, int argc, char **argv)
|
||||
if (cft_check_handle)
|
||||
tree_spec.check_status = cft_check_handle->status;
|
||||
|
||||
if (tree_spec.type != CFG_DEF_TREE_CURRENT)
|
||||
cft = config_def_create_tree(&tree_spec);
|
||||
if ((tree_spec.type != CFG_DEF_TREE_CURRENT) &&
|
||||
!(cft = config_def_create_tree(&tree_spec))) {
|
||||
r = ECMD_FAILED;
|
||||
goto_out;
|
||||
}
|
||||
|
||||
if (!config_write(cft, arg_count(cmd, withcomments_ARG),
|
||||
arg_count(cmd, withversions_ARG),
|
||||
|
Loading…
Reference in New Issue
Block a user