1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-10 16:58:47 +03:00

cleanup: free mempool memory used for LV status in PVSEGS reporting

Addendum to previous commit 4de7699855e06bf341d5f91b9c3fc4ba4de18cd6.
This commit is contained in:
Peter Rajnoha 2014-11-13 14:41:01 +01:00
parent 4de7699855
commit 48874703d2

View File

@ -223,7 +223,8 @@ static int _do_pvsegs_sub_single(struct cmd_context *cmd,
int ret = ECMD_PROCESSED;
struct lv_segment *seg = pvseg->lvseg;
struct lvinfo lvinfo = { .exists = 0 };
struct lv_seg_status lv_seg_status = { .type = SEG_STATUS_NONE };
struct lv_seg_status lv_seg_status = { .type = SEG_STATUS_NONE,
.status = NULL };
struct segment_type _freeseg_type = {
.name = "free",
@ -269,6 +270,8 @@ static int _do_pvsegs_sub_single(struct cmd_context *cmd,
}
out:
if (seg && lv_seg_status.status)
dm_pool_free(lv_seg_status.mem, lv_seg_status.status);
return ret;
}