master - thin: fix error path mem leak
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=80c3fb786cc236f200026624ded4c668b37ef22d Commit: 80c3fb786cc236f200026624ded4c668b37ef22d Parent: 3cadc1c87e4f1f6cede3895a7f7f28f37eaf9648 Author: Zdenek Kabelac <[email protected]> AuthorDate: Sun Nov 8 17:04:03 2015 +0100 Committer: Zdenek Kabelac <[email protected]> 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(-)
WHATS_NEW +1 -0
@@ -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.
lib/activate/dev_manager.c +1 -1
@@ -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.",