mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-23 21:35:29 +03:00
Fix memory leak in lv_info_by_lvid
The lv_from_lvid calls internally vg_read(), we must release vg structure afterwards. Code is called only from clvmd.
This commit is contained in:
parent
b7e19d2fe3
commit
b17ddc26c0
@ -1,5 +1,6 @@
|
||||
Version 2.02.57 -
|
||||
====================================
|
||||
Fix clvmd memory leak in lv_info_by_lvid.
|
||||
Do not allow creating mirrors of more than 8 images.
|
||||
Use locking_type 3 (compiled in cluster locking) in lvmconf.
|
||||
Remove duplicate dm_list macros and functions.
|
||||
|
@ -486,12 +486,16 @@ int lv_info(struct cmd_context *cmd, const struct logical_volume *lv, struct lvi
|
||||
int lv_info_by_lvid(struct cmd_context *cmd, const char *lvid_s,
|
||||
struct lvinfo *info, int with_open_count, int with_read_ahead)
|
||||
{
|
||||
int r;
|
||||
struct logical_volume *lv;
|
||||
|
||||
if (!(lv = lv_from_lvid(cmd, lvid_s, 0)))
|
||||
return 0;
|
||||
|
||||
return _lv_info(cmd, lv, 0, info, with_open_count, with_read_ahead, 0);
|
||||
r = _lv_info(cmd, lv, 0, info, with_open_count, with_read_ahead, 0);
|
||||
vg_release(lv->vg);
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user