1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-02 01:18:26 +03:00

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.
This commit is contained in:
Zdenek Kabelac 2015-11-08 17:04:03 +01:00
parent 3cadc1c87e
commit 80c3fb786c
2 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.135 - 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. Add missing test for failing node allocation in lvmetad.
Correct configure messages when enabling/disabling lvmlockd. Correct configure messages when enabling/disabling lvmlockd.

View File

@ -567,7 +567,7 @@ static int _ignore_unusable_thins(struct device *dev)
dm_get_next_target(dmt, next, &start, &length, &target_type, &params); dm_get_next_target(dmt, next, &start, &length, &target_type, &params);
if (!dm_get_status_thin_pool(mem, params, &status)) if (!dm_get_status_thin_pool(mem, params, &status))
return_0; goto_out;
if (status->read_only || status->out_of_data_space) { if (status->read_only || status->out_of_data_space) {
log_warn("WARNING: %s: Thin's thin-pool needs inspection.", log_warn("WARNING: %s: Thin's thin-pool needs inspection.",