diff options
author | Peter Rajnoha <prajnoha@redhat.com> | 2014-11-13 14:41:01 +0100 |
---|---|---|
committer | Peter Rajnoha <prajnoha@redhat.com> | 2014-11-13 14:41:01 +0100 |
commit | 48874703d2deee676d326ed4447c7944ab728767 (patch) | |
tree | 3a3383f7218481356db3e3e66ddb2000fd573bce | |
parent | 4de7699855e06bf341d5f91b9c3fc4ba4de18cd6 (diff) | |
download | lvm2-48874703d2deee676d326ed4447c7944ab728767.tar.gz |
cleanup: free mempool memory used for LV status in PVSEGS reporting
Addendum to previous commit 4de7699855e06bf341d5f91b9c3fc4ba4de18cd6.
-rw-r--r-- | tools/reporter.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/reporter.c b/tools/reporter.c index ec1feb2d1..24191f190 100644 --- a/tools/reporter.c +++ b/tools/reporter.c @@ -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; } |