mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
reporter: add missing stack trace
Use goto_out on error paths.
This commit is contained in:
parent
43777b551d
commit
0128770d6d
@ -657,9 +657,8 @@ static int _get_report_options(struct cmd_context *cmd,
|
||||
int r = ECMD_PROCESSED;
|
||||
|
||||
if (!(mem = dm_pool_create("report_options", 128))) {
|
||||
r = ECMD_FAILED;
|
||||
log_error("Failed to create temporary mempool to process report options.");
|
||||
goto_out;
|
||||
return ECMD_FAILED;
|
||||
}
|
||||
|
||||
if (!(final_opts_list = str_to_str_list(mem, *options, ",", 1))) {
|
||||
@ -704,24 +703,24 @@ static int _get_report_options(struct cmd_context *cmd,
|
||||
default:
|
||||
if (!(final_opts_list = str_to_str_list(mem, opts, ",", 1))) {
|
||||
r = ECMD_FAILED;
|
||||
goto out;
|
||||
goto_out;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!(*options = str_list_to_str(cmd->mem, final_opts_list, ","))) {
|
||||
r = ECMD_FAILED;
|
||||
goto out;
|
||||
goto_out;
|
||||
}
|
||||
if (final_compact_list &&
|
||||
!(*fields_to_compact = str_list_to_str(cmd->mem, final_compact_list, ","))) {
|
||||
dm_pool_free(cmd->mem, (char *) *options);
|
||||
r = ECMD_FAILED;
|
||||
goto out;
|
||||
goto_out;
|
||||
}
|
||||
out:
|
||||
if (mem)
|
||||
dm_pool_destroy(mem);
|
||||
dm_pool_destroy(mem);
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user