1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-21 02:50:41 +03:00

Do not use pointer from released memory pool (cmd->cmd_line).

This commit is contained in:
Milan Broz 2009-04-02 14:59:48 +00:00
parent 2a1f78f95a
commit 0889882255

View File

@ -1026,16 +1026,16 @@ int lvm_run_command(struct cmd_context *cmd, int argc, char **argv)
cmd->current_settings = cmd->default_settings;
_apply_settings(cmd);
/*
* free off any memory the command used.
*/
dm_pool_empty(cmd->mem);
if (ret == EINVALID_CMD_LINE && !_cmdline.interactive)
_short_usage(cmd->command->name);
log_debug("Completed: %s", cmd->cmd_line);
/*
* free off any memory the command used.
*/
dm_pool_empty(cmd->mem);
return ret;
}