mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
Check for vg_name existance
Since vg_read() mda ops could be called with NULL vg_name, check it before derefence also for pool and format1.
This commit is contained in:
parent
ceec205594
commit
530efdb525
@ -1,5 +1,6 @@
|
||||
Version 2.02.94 -
|
||||
====================================
|
||||
Check for existance of vg_name in _format1/_pool_vg_read().
|
||||
Fix missing break in _format_pvsegs (2.02.92).
|
||||
Test seg pointer for non-null it in raid_target_percent error path.
|
||||
Check for errors in _init_tags() during config loading.
|
||||
|
@ -186,6 +186,7 @@ static struct volume_group *_format1_vg_read(struct format_instance *fid,
|
||||
DM_LIST_INIT(pvs);
|
||||
|
||||
/* Strip dev_dir if present */
|
||||
if (vg_name)
|
||||
vg_name = strip_dir(vg_name, fid->fmt->cmd->dev_dir);
|
||||
|
||||
if (!(vg = alloc_vg("format1_vg_read", fid->fmt->cmd, NULL)))
|
||||
|
@ -110,6 +110,7 @@ static struct volume_group *_pool_vg_read(struct format_instance *fid,
|
||||
/* We can safely ignore the mda passed in */
|
||||
|
||||
/* Strip dev_dir if present */
|
||||
if (vg_name)
|
||||
vg_name = strip_dir(vg_name, fid->fmt->cmd->dev_dir);
|
||||
|
||||
/* Set vg_name through read_pool_pds() */
|
||||
|
Loading…
Reference in New Issue
Block a user