1
0
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:
Zdenek Kabelac 2013-04-21 13:12:58 +02:00
parent 5070ffbca7
commit ba3cee3630

View File

@ -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;
}
}
}