From: David Teigland <teigland@sourceware.org>
To: lvm-devel@redhat.com
Subject: main - fix empty mem pool leak
Date: Thu, 3 Jun 2021 19:47:18 +0000 (GMT) [thread overview]
Message-ID: <20210603194718.DF7F2386FC05@sourceware.org> (raw)
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);
reply other threads:[~2021-06-03 19:47 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210603194718.DF7F2386FC05@sourceware.org \
--to=teigland@sourceware.org \
--cc=lvm-devel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.