[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[lvm-devel] [PATCH 2/2] Fix report of uninitalized pool leak (t-lvm-init.sh)



Signed-off-by: Zdenek Kabelac <zkabelac redhat com>
---
 tools/lvmcmdline.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c
index 6c66fab..b29acfb 100644
--- a/tools/lvmcmdline.c
+++ b/tools/lvmcmdline.c
@@ -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)) {
 		/* 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;
 		}
-- 
1.7.2.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]