mirror of
git://sourceware.org/git/lvm2.git
synced 2025-08-31 09:49:29 +03:00
Fix memory leak of config_tree
Adding missing destroy_config_tree() for cft_override if it has been allocated.
This commit is contained in:
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.75 -
|
Version 2.02.75 -
|
||||||
=====================================
|
=====================================
|
||||||
|
Fix memory leak of config_tree in reinitialization code path.
|
||||||
Swap pool destruction order in dmeventd_lvm2_exit() to fix leak report.
|
Swap pool destruction order in dmeventd_lvm2_exit() to fix leak report.
|
||||||
Read whole /proc/self/maps file before working with maps entries.
|
Read whole /proc/self/maps file before working with maps entries.
|
||||||
Speed up unquoting of quoted double quotes and backslashes.
|
Speed up unquoting of quoted double quotes and backslashes.
|
||||||
|
@ -1048,6 +1048,10 @@ int lvm_run_command(struct cmd_context *cmd, int argc, char **argv)
|
|||||||
if (arg_count(cmd, config_ARG) || !cmd->config_valid || config_files_changed(cmd)) {
|
if (arg_count(cmd, config_ARG) || !cmd->config_valid || config_files_changed(cmd)) {
|
||||||
/* Reinitialise various settings inc. logging, filters */
|
/* Reinitialise various settings inc. logging, filters */
|
||||||
if (!refresh_toolcontext(cmd)) {
|
if (!refresh_toolcontext(cmd)) {
|
||||||
|
if (cmd->cft_override) {
|
||||||
|
destroy_config_tree(cmd->cft_override);
|
||||||
|
cmd->cft_override = NULL;
|
||||||
|
}
|
||||||
log_error("Updated config file invalid. Aborting.");
|
log_error("Updated config file invalid. Aborting.");
|
||||||
return ECMD_FAILED;
|
return ECMD_FAILED;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user