mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
config: check for hash success
Hash insert may fail.
This commit is contained in:
parent
5070ffbca7
commit
ba3cee3630
@ -577,7 +577,11 @@ int config_def_check(struct cmd_context *cmd, int force, int skip, int suppress_
|
||||
cmd->cft_def_hash = NULL;
|
||||
r = 0; goto out;
|
||||
}
|
||||
dm_hash_insert(cmd->cft_def_hash, vp, def);
|
||||
if (!dm_hash_insert(cmd->cft_def_hash, vp, def)) {
|
||||
log_error("Failed to insert configuration to hash.");
|
||||
r = 0;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user