From: Zdenek Kabelac <zkabelac@fedoraproject.org>
To: lvm-devel@redhat.com
Subject: master - thin: fix error path mem leak
Date: Mon, 9 Nov 2015 09:28:33 +0000 (UTC) [thread overview]
Message-ID: <20151109092833.1887A60CD3@fedorahosted.org> (raw)
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=80c3fb786cc236f200026624ded4c668b37ef22d
Commit: 80c3fb786cc236f200026624ded4c668b37ef22d
Parent: 3cadc1c87e4f1f6cede3895a7f7f28f37eaf9648
Author: Zdenek Kabelac <zkabelac@redhat.com>
AuthorDate: Sun Nov 8 17:04:03 2015 +0100
Committer: Zdenek Kabelac <zkabelac@redhat.com>
CommitterDate: Mon Nov 9 10:19:19 2015 +0100
thin: fix error path mem leak
Coverity: when parsing of thin-pool status would have failed,
it could have leaked memory pool and dmt struct.
---
WHATS_NEW | 1 +
lib/activate/dev_manager.c | 2 +-
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index d0a1476..6368b32 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.135 -
====================================
+ Fix memory leak on error path of failing thin-pool percentage check.
Add missing test for failing node allocation in lvmetad.
Correct configure messages when enabling/disabling lvmlockd.
diff --git a/lib/activate/dev_manager.c b/lib/activate/dev_manager.c
index 964eef5..6ec9d22 100644
--- a/lib/activate/dev_manager.c
+++ b/lib/activate/dev_manager.c
@@ -567,7 +567,7 @@ static int _ignore_unusable_thins(struct device *dev)
dm_get_next_target(dmt, next, &start, &length, &target_type, ¶ms);
if (!dm_get_status_thin_pool(mem, params, &status))
- return_0;
+ goto_out;
if (status->read_only || status->out_of_data_space) {
log_warn("WARNING: %s: Thin's thin-pool needs inspection.",
reply other threads:[~2015-11-09 9:28 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=20151109092833.1887A60CD3@fedorahosted.org \
--to=zkabelac@fedoraproject.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.