mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-10 05:18:36 +03:00
metadata: Do not try to check vg_name of a NULL PV.
This commit is contained in:
parent
eb2c68590b
commit
0f49180ea7
@ -1822,7 +1822,7 @@ struct physical_volume *find_pv_by_name(struct cmd_context *cmd,
|
||||
}
|
||||
}
|
||||
|
||||
if (!allow_orphan && is_orphan_vg(pv->vg_name)) {
|
||||
if (pv && !allow_orphan && is_orphan_vg(pv->vg_name)) {
|
||||
log_error("Physical volume %s not in a volume group", pv_name);
|
||||
goto bad;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user