fix cmd->cmd_line memory pool use
PATCH 1/1 fix cmd->cmd_line memory pool use
Do not use pointer from released memory pool (cmd->cmd_line).
Signed-off-by Milan Broz <[email protected]>
--- tools/lvmcmdline.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)
tools/lvmcmdline.c +5 -5
@@ -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; }
PATCH 1/1 fix cmd->cmd_line memory pool use
Quoted 1 line · Milan Broz
Do not use pointer from released memory pool (
cmd->cmd_line).
Ack.
Alasdair
Signature · 1 line
agk at redhat.com