1
0
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:
Petr Rockai 2013-03-20 14:34:05 +01:00
parent eb2c68590b
commit 0f49180ea7

View File

@ -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;
}