mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-18 10:04:20 +03:00
raid: fix error path for lv_raid_data_offset
Avoid using allocated status on error path.
This commit is contained in:
parent
9be086fbee
commit
ce199db848
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.178 -
|
Version 2.02.178 -
|
||||||
=====================================
|
=====================================
|
||||||
|
Fix memleak on error path when obtaining lv_raid_data_offset.
|
||||||
Fix compatibility size test of extended external origin.
|
Fix compatibility size test of extended external origin.
|
||||||
Add external_origin visiting in for_each_sub_lv().
|
Add external_origin visiting in for_each_sub_lv().
|
||||||
Ensure cluster commands drop their device cache before locking VG.
|
Ensure cluster commands drop their device cache before locking VG.
|
||||||
|
@ -1006,8 +1006,10 @@ int lv_raid_data_offset(const struct logical_volume *lv, uint64_t *data_offset)
|
|||||||
if (!(dm = dev_manager_create(lv->vg->cmd, lv->vg->name, 1)))
|
if (!(dm = dev_manager_create(lv->vg->cmd, lv->vg->name, 1)))
|
||||||
return_0;
|
return_0;
|
||||||
|
|
||||||
if (!(r = dev_manager_raid_status(dm, lv, &status)))
|
if (!(r = dev_manager_raid_status(dm, lv, &status))) {
|
||||||
stack;
|
dev_manager_destroy(dm);
|
||||||
|
return_0;
|
||||||
|
}
|
||||||
|
|
||||||
*data_offset = status->data_offset;
|
*data_offset = status->data_offset;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user