1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-10-15 19:33:17 +03:00

Add dm_zalloc and use it and dm_pool_zalloc throughout.

This commit is contained in:
Alasdair Kergon
2010-09-30 21:06:50 +00:00
parent 0ca1492ca5
commit ac0252ca07
21 changed files with 87 additions and 93 deletions

View File

@@ -1121,11 +1121,10 @@ struct cmd_context *create_toolcontext(unsigned is_long_lived,
init_syslog(DEFAULT_LOG_FACILITY);
if (!(cmd = dm_malloc(sizeof(*cmd)))) {
if (!(cmd = dm_zalloc(sizeof(*cmd)))) {
log_error("Failed to allocate command context");
return NULL;
}
memset(cmd, 0, sizeof(*cmd));
cmd->is_long_lived = is_long_lived;
cmd->handles_missing_pvs = 0;
cmd->handles_unknown_segments = 0;