Adding missing destroy_config_tree() for cft_override if it has been allocated.
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.
Read whole /proc/self/maps file before working with maps entries.
Speed up unquoting of quoted double quotes and backslashes.
if (arg_count(cmd, config_ARG) || !cmd->config_valid || config_files_changed(cmd)) {
/* Reinitialise various settings inc. logging, filters */
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.");
return ECMD_FAILED;
}