All of lore.kernel.org
 help / color / mirror / Atom feed
* main - fix empty mem pool leak
@ 2021-06-03 19:47 David Teigland
  0 siblings, 0 replies; only message in thread
From: David Teigland @ 2021-06-03 19:47 UTC (permalink / raw)
  To: lvm-devel

Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=c43f2f8ae08ed0555a300764c8644ea56f4f41e2
Commit:        c43f2f8ae08ed0555a300764c8644ea56f4f41e2
Parent:        fe05828e7e4c78a1ed4430ce4057c785d0b898a0
Author:        David Teigland <teigland@redhat.com>
AuthorDate:    Thu Jun 3 14:44:55 2021 -0500
Committer:     David Teigland <teigland@redhat.com>
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(-)

diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c
index 296618686..e2be89d0f 100644
--- a/lib/commands/toolcontext.c
+++ b/lib/commands/toolcontext.c
@@ -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);



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-03 19:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-03 19:47 main - fix empty mem pool leak David Teigland

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.