main - fix empty mem pool leak
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=c43f2f8ae08ed0555a300764c8644ea56f4f41e2 Commit: c43f2f8ae08ed0555a300764c8644ea56f4f41e2 Parent: fe05828e7e4c78a1ed4430ce4057c785d0b898a0 Author: David Teigland <[email protected]> AuthorDate: Thu Jun 3 14:44:55 2021 -0500 Committer: David Teigland <[email protected]> CommitterDate: Thu Jun 3 14:46:33 2021 -0500
fix empty mem pool leak
of "config" when LVM_SYSTEM_DIR=""
--- lib/commands/toolcontext.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
lib/commands/toolcontext.c +2 -2
@@ -966,8 +966,8 @@ static void _destroy_config(struct cmd_context *cmd)/* CONFIG_FILE/CONFIG_MERGED_FILES */ if ((cft =remove_config_tree_by_source (cmd,CONFIG_MERGED_FILES )))config_destroy (cft); -else -remove_config_tree_by_source (cmd,CONFIG_FILE ); +else if ((cft =remove_config_tree_by_source (cmd,CONFIG_FILE ))) +config_destroy (cft); dm_list_iterate_items(cfl, &cmd->config_files)config_destroy (cfl->cft);